Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with all request: HTTPSConnectionPool(host='trends.google.com', port=443): Max retries exceeded #609

Open
dteite opened this issue Jan 9, 2024 · 17 comments

Comments

@dteite
Copy link

dteite commented Jan 9, 2024

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()
@pentarix1996
Copy link

Same problem today even with the use of proxies...

@williamegomezo
Copy link

Same problem over here.

@andrebuhler
Copy link

Same here.

@Nicole-Yancy
Copy link

me too. It was working fine last week, but the past two days its been instant 429 error.

@AhmadKhanSenpai
Copy link

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.

@cooperjaXC
Copy link

cooperjaXC commented Jan 11, 2024

Saturday 6 January was the last time it worked for me. This error has occurred persistently since then.

@andrebuhler
Copy link

For me, 2024-01-05 10:20:31 (+03:00) was the last

@dteite
Copy link
Author

dteite commented Jan 11, 2024

2024-01-07 worked for me, but 2024-01-08 failed

@aardvark123456789
Copy link

2024.01.06 @ 09:41 AM UTC was the last time it worked for me at all. What happened?

@williamegomezo
Copy link

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.

@pentarix1996
Copy link

I think it magically worked again, am I the only one that works again?

@cooperjaXC
Copy link

I think it magically worked again, am I the only one that works again?

It also started working for me again as well!

@Rupin817
Copy link

@pentarix1996 how did it start work again?

@Edricklam123
Copy link

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'))

@mahdikhojasteh
Copy link

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?

@wawankurniawan
Copy link

Has anyone already resolved this issue?

@qo4on
Copy link

qo4on commented Jun 23, 2024

Any news on that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests