使用R解析App Annie

时间:2015-11-14 05:15:13

标签: r css-selectors web-crawler

我正在尝试使用R解析App Annie。但是,似乎html_nodes或xpathSApply无法正确解析网页。例如,我有以下代码:

library(rvest)
library(httr)

topurl="https://www.appannie.com/apps/ios/top/?_ref=header&device=iphone"
downfurl<-GET(topurl)
profpage <- read_html(downfurl, encoding = "UTF-8")
profnode<-profpage %>%html_nodes(".title-info a")

&#34; .title-info a&#34;是我使用SelectorGadget获得的选择器。但是,profnode的值始终为:

{xml_nodeset (0)}

我也试过使用xpathSApply,但它返回NULL

我需要在这里玩什么技巧吗?

0 个答案:

没有答案