我正在尝试从R中的reddit抓取一个表。这是链接:https://old.reddit.com/r/hiphopheads/comments/9nocy8/twenty_one_pilots_trench_sells_170k_first_week/
我正在尝试在帖子中刮擦主表。这是我的代码:
library(rvest)
url <- "https://old.reddit.com/r/hiphopheads/comments/9nocy8/twenty_one_pilots_trench_sells_170k_first_week/"
albums <- url %>%
read_html() %>%
html_nodes(xpath ='//*[@id="form-t3_9nocy8ire"]/div/div/table') %>%
html_table()
albums
问题是,这总是向我返回0列表。对正确刮除此内容的任何帮助将不胜感激。谢谢!