0
我试图用rvest
程序包来抓取一组网页。它在获取网页内容时起作用,但我无法获得第一层的创建时间,该网页为2017-08-17 01:47。使用rvest获取满量程内容
url <- read_html("http://tieba.baidu.com/p/5275787419", encoding = "UTF-8")
# This works
contents <- url %>% html_nodes(".d_post_content_firstfloor .clearfix") %>% html_text()
# This doesn't work
create_time <- url %>% html_nodes(".d_post_content_firstfloor li+ li span") %>% html_text()
create_time
character(0)
我想在网络上一楼的时间,但我不知道如何访问它。
It works !!!非常感谢!!! –
很高兴它帮助!顺便说一句,为什么不把它标记为'正确的答案'呢? :) – Prem
标记了!这是我第一次在堆栈溢出中提出问题〜谢谢你的帮助! –