0

I am trying to access the data off of Google Trends. I am using Rselenium to access my Gmail account; hoping the credentials will increase my quota in terms of daily limits. Unfortunately, after a few scrapes, I receive an error page.onError - msg: ReferenceError: Can't find variable and was curious on how I can avoid this. I am assuming it has to do with me reaching my daily limits. I also used rvest and no luck there either. I read a couple of blog posts stating that I have to enable my cookies but I do not know how to do so using Phantomjs.

url <- 'https://www.google.com/trends/fetchComponent?hl=en-US&q=next,geo=US&cid=TOP_QUERIES_0_0'
remDr$navigate(url)
abc <- webElemen02$getPageSource()
top_searches <- read_html(unlist(abc))%>% 
html_nodes(xpath='//*[@class="trends-bar-chart-name"]') %>% 
html_text(trim=TRUE)
aselvendran
  • 105
  • 2
  • 9
  • That error message is incomplete. Also, if it's really about quota limits, nobody can help you, because that is against the terms and conditions. – Artjom B. Aug 15 '16 at 05:00
  • I see, sorry about that. There is a quota limit placed by Google in which I wasn't aware of. I realized this when the code works sometimes and then stops working soon after. Thank you for the response! – aselvendran Sep 18 '16 at 12:43

0 Answers0