我想使用R从Reddit上的搜索结果中提取链接。这是我的代码:
library('rvest')
url='https://www.reddit.com/search?q=Atlanta%20Hawks%20New%20York%20Knicks%20post%20game%20thread%20107%20126'
NBA=read_html(url)
games_link=NBA %>% html_nodes(".cDxKta span") %>% html_attr('href')
我想提取每个搜索结果的URL。返回的结果是NA。有人知道出了什么问题吗?