程序如下;
library(rvest)
library(stringr)
url = 'http://weibo.com/p/100808f8b273063bbf129c4b4c8d4b88490682?k=Galaxy+S6+edge&from=526&_from_=huati_topic'
web<-html(url,encoding="UTF-8")
web%>% html_nodes(".W_f12")
网址:
http://weibo.com/p/100808f8b273063bbf129c4b4c8d4b88490682?k=Galaxy+S6+edge&from=526&_from_=huati_topic
附图1:想抓取的数据