pytrends
pytrends copied to clipboard
How to use the proxies feature?
Hi,
I can't really figure out how to use the proxies feature. If anyone can explain in more detail, it would be really helpful and appreciated.
Background I downloaded about 3 years worth of data with about 0.5 second sleep. Everything was fine. When I started downloading data again, I got the following error:
The request failed: Google returned a response with code 429
So even 30 min after that, I still get this error. I thought it's a great time to try the proxies out, but no luck still : /
I have the same question, waiting on an answer.
Still waiting :(
same here
1 year after this prob still remains...==
Ok, you need a list of HTTPS or HTTP proxies, you can find these lists for free every where just search up HTTPS proxy list in google. then you need to check the proxies that you got through a proxy checker, or do it yourself. Website like https://hidemy.name/en/proxy-checker/ will check proxies. After this if you only have HTTP you need to find the library files in you venv file, its called request.py in that file you need to change all instances of https to http that aren't part of full urls. An easy way to find this file is by using vscode and right clicking, and clicking on go to definition. So one of the lines of code should be proxy = {'https': self.proxies[self.proxy_index]}, change that to proxy = {'http': self.proxies[self.proxy_index]}, and do that for all of them, don't change for example 'https://trends.google.com/?geo={geo}' to 'http://trends.google.com/?geo={geo}', that will break it. After all that save the file and run the code. It should work!