pytrends
pytrends copied to clipboard
Error with all request: HTTPSConnectionPool(host='trends.google.com', port=443): Max retries exceeded
Error: requests.exceptions.RetryError: HTTPSConnectionPool(host='trends.google.com', port=443): Max retries exceeded with url: /trends/api/widgetdata/multiline?req=%7B%22time%22%3A+%222019-01-09+2024-01-09%22%2C+%22resolution%22%3A+%22WEEK%22%2C+%22locale%22%3A+%22fr%22%2C+%22comparisonItem%22%3A+%5B%7B%22geo%22%3A+%7B%7D%2C+%22complexKeywordsRestriction%22%3A+%7B%22keyword%22%3A+%5B%7B%22type%22%3A+%22BROAD%22%2C+%22value%22%3A+%22Blockchain%22%7D%5D%7D%7D%5D%2C+%22requestOptions%22%3A+%7B%22property%22%3A+%22%22%2C+%22backend%22%3A+%22IZG%22%2C+%22category%22%3A+0%7D%2C+%22userConfig%22%3A+%7B%22userType%22%3A+%22USER_TYPE_SCRAPER%22%7D%7D&token=APP6_UEAAAAAZZ5nibSrd7eGFaW6zIrTCcwnlMaBCZpn&tz=360 (Caused by ResponseError('too many 429 error responses'))
Example:
pytrends = TrendReq(
hl="fr-FR",
tz=360,
timeout=(10, 25),
retries=2,
backoff_factor=1,
requests_args={"verify": False},
)
kw_list = ["Blockchain"]
pytrends.build_payload(kw_list, cat=0, timeframe='today 5-y', geo='', gprop='')
pytrends.interest_over_time()
Same problem today even with the use of proxies...
Same problem over here.
Same here.
me too. It was working fine last week, but the past two days its been instant 429 error.
Me too, it happened recently, a week ago it was fine, even after using proxies it do not work. It looks like I have to use selenium driver to make it work, I need to edit the package itself.
Saturday 6 January was the last time it worked for me. This error has occurred persistently since then.
For me, 2024-01-05 10:20:31 (+03:00) was the last
2024-01-07 worked for me, but 2024-01-08 failed
2024.01.06 @ 09:41 AM UTC was the last time it worked for me at all. What happened?
I did a lot of reverse engineering and found the following:
-
There is one endpoint that changed and then is returning 404. {BASE_TRENDS_URL}/explore/?geo={self.hl[-2:]} is now {TrendReq.GENERAL_URL}/pickers/geo?hl={self.hl}
-
The token generated by google trends is user type: user scrapper. This is because the recaptcha badge included. So probably this is not going to work again until we solve recaptcha validation. And to be honest is complex, it is sending right now a payload that I could not decoded to {BASE_TRENDS_URL}/api/explore, so there is no way to get a valid token.
-
I opted to use better my custom selenium code, and it is working well. More ram and resources, but it is a temporary solution.
I think it magically worked again, am I the only one that works again?
I think it magically worked again, am I the only one that works again?
It also started working for me again as well!
@pentarix1996 how did it start work again?
May I ask if anyone encountered the following error starting from this week, it was working previously:
requests.exceptions.RetryError: HTTPSConnectionPool(host='trends.google.com', port=443): Max retries exceeded with url: ..... (Caused by ResponseError('too many 429 error responses'))
May I ask if anyone encountered the following error starting from this week, it was working previously:
requests.exceptions.RetryError: HTTPSConnectionPool(host='trends.google.com', port=443): Max retries exceeded with url: ..... (Caused by ResponseError('too many 429 error responses'))
yes it is few days that I also get this error even using proxy does not help, has anyone found a solution for this issue?
Has anyone already resolved this issue?
Any news on that?