Why can't I scrape the following table

2019-09-05 15:00发布

I'm using the code below in order to scrape a webpage's list.The result that I get is only the table's header.How can I scrape the whole table?

library(rvest)
theurl <- "http://www.forbes.com/midas/list/"
file<-read_html(theurl)
tables<-html_nodes(file, "table")
table1 <- html_table(tables[2], fill = F)
table1
c<-as.data.frame(lapply(table1, stack))
summary(c$values)
head(c$values)

标签: r rvest
0条回答
登录 后发表回答