-
Notifications
You must be signed in to change notification settings - Fork 815
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
429 After first request? #243
Comments
same problem here |
For what its worth, this is also happening to me for an analogous javascript google trends library. |
Same problem here. Seems it only started to happen today... |
After doing a bit more sleuthing, this is also happening on the last working version I had used, which was version |
also getting the same problem today |
Same problem here. :( |
I have been fighting with this all day. Even tried hitting it as such:
I get the same 429... This hurts, Totally killed progress on my research today. |
Did anyone manage to find any solution? As I checked a request without any params on |
The So, in the code you would need to simulate this behavior — make the initial request, remember the cookie, then make the same request again, but this time providing the stored cookie. |
@RKushnir is this possible as of now? I do not see in the code how. I tried by changing the code and call trends.google.com in the init of TrendReq call and store it in a cookies attribute. In the get_data I did then provide cookies to requests.get call. This works, but I am not sure if this is needed. Neither do I know if this should even be handled by TrendReq itself (additional call to google on all TrendReq inits), or shall be provided by the user somehow (for the user it seems kinda inconvinient to think about that every time he requests something) |
@dabdada I mean it as a hint how to fix/work around this issue in general. Probably, the library code needs a fix. |
I got it to work in R: PMassicotte/gtrendsR#273. Not sure how to implement it in Python, but it's apparently the "OTZ" cookie from apis.google.com that you need set. |
@zachokeeffe In my experiments the name of the cookie was |
@dreyco676 just merged a PR from @dabdada that includes all cookies from Thanks for helping with this issue! |
@kakarla7 so do a # sudo pip install pytrends --upgrade |
Anyone with any luck on it? I am getting the same issue |
Make sure you download the latest version of Pytrends from this repo. I had this problem, and the last check-in seems to have fixed it. |
@dripti yes. directly installing from pytrends githu repo helped me (picture in my previous comment) |
i have already uninstalled and installed again but still doesn't work |
Could you maybe try deleting pyc files? |
I am experiencing the same problem. I tried removing and installing it again but did not fix the problem. Tried updating and installing directly from the repo did not fix the problem. |
Anyone know how long you go to rate limit jail? I can't even do a google trends web search without error 429. |
@MYRepoMan do you have cookies enabled? Maybe some browser add-on is blocking them? |
I tried your solution @lopezdp but the problem still there. Like updating it directly from the repo. |
I installed the package from pycharm and it works for me |
May be easier to clone the repository and install using the setup.py file |
Its looks like request.py was updated. I switched out that file and everything seems to work without issue :) |
Hello all, |
can you provide an error message for what you are seeing and some code @kalagee-anjaria |
The error message is The request failed: Google returned a response with code 429. The pytrends = TrendReq works fine in my localhost, but on AWS server it keeps giving this error. |
what aws setup do you use? lambda, ec2, anything else? |
I am using EC2 |
I've also found the problem again in my localhost. I'm using jupyter notebook. I get this: I've tried making sure it's the most up-to-date version of |
@JessHPRH Try using VS Code. It's working on localhost there |
I'm using Anaconda and when I tried to run my script in VS Code it told me it didn't recognise my installation of |
TLDR; I solved the problem with a custom patch |
I want to use pytrend with lamda but getting error. Any one know how to fix it |
This didnt work for me unfortunately, after implementing into my script :( |
Howdy,
I'm attempting to use the library and I'm getting hit with a 429 error after copying the example code.
Here's my script:
I can visit the trends website fine, and I can copy and paste the URL produced by the API and get a json file just fine. It's hard for me to imagine being rate limited on my first request and still being able to visit the site normally.
Any ideas?
The text was updated successfully, but these errors were encountered: