Login issue with gconnect() in gtrendsR package

2019-03-12 15:50发布

I am trying to log into my Google account in R using gconnect() in the gtrendsR package, but am running into issues. I have been doing research using Google Trends data for the last month, and have never had a problem with this.

Please let me know if you have any thoughts. I had Google Support take a look at my account to see if there were any holds or something, but nothing showed up. Also tried logging in through another account which didnt work..

This is what I am trying to do:

usr <- 'my_username@gmail.com'
psw <- 'my_password'
gconnect(usr, psw)

And then I am returned with the following error:

Google login failed! Check your login information.NULL

3条回答
Evening l夕情丶
2楼-- · 2019-03-12 16:33

It seems there is no quick solution for gtrends. However, I discovered a URL which directly downloads the data.

This url is the link of 'download as csv' menu in Google Trends. However, direct fetching from R by download.file function is problematic.

查看更多
神经病院院长
3楼-- · 2019-03-12 16:38

Log into your Google Account again and check if it works now. I had the same problem but miraculously everything works again today. It seems to me as if Google sometimes moves accounts into some sort of quarantine state and releases them after a while.

查看更多
贪生不怕死
4楼-- · 2019-03-12 16:47

See this page: https://www.google.com/settings/security/lesssecureapps. Try switching to "on" if the setting is "off".

查看更多
登录 后发表回答