Url<-
"http://illuma.tmall.com/search.htm?spm=a1z10.4-b.w5001-7280993071.13.LhLkZK&scene=taobao_shop"
Web<-html(Url,encoding="GBK")
#Customer Review
CR<-
Web%>%
html_nodes("h4 a span")%>%
html_text()%>%
iconv("UTF-8","GBK")
按理说这样就可以获取评论部分的结果,但实际返回为0rvest抓取淘宝无果
> Url <- "http://illuma.tmall.com/search.htm?spm=a1z10.4-b.w5001-7280993071.13.LhLkZK&scene=taobao_shop"
> CR <- Url %>% html_session %>% html_nodes("h4 a span") %>% html_text() %>% iconv("UTF-8","GBK")
> CR
[1] "评价: 328" "评价: 270" "评价: 445" "评价: 1322" "评价: 34" "评价: 29" "评价: 150"
[8] "评价: 178" "评价: 26" "评价: 172" "评价: 158" "评价: 333"