Open aspiringguru opened 4 years ago
Thank you, helped me a lot! I definetly suggest to submit a pull request!
You just saved me troubleshooting time- thank you!
Thankyou - I'm working on this now and have been running through trial and error also.
Thanks! You solved my problem
Thank you, I am not native English speaker. What do you mean exactly by
I found these values work by replicating the url created by the form
Thank you
Thank you, I am not native English speaker. What do you mean exactly by
I found these values work by replicating the url created by the form
Thank you
He read the urls that are generated, and found the keywords in the urls.
For example, in this url: https://trends.google.com/trends/explore?date=today%201-m&geo=US&q=tesla
you can see 'today 1-m'
I had trouble debugging errors, typically code 400, turns out the service only accepts inputs replicating the web form (obvious really).
I saw this a lot, thought it was an api timeout. pytrends.exceptions.ResponseError: The request failed: Google returned a response with code 400.
after some trial and error I found these values work by replicating the url created by the form.
'now 1-H', 'now 4-H', 'now 1-d', 'now 7-d', 'today 1-m', 'today 3-m', 'today 12-m', 'today 5-y', 'all'
ie https://trends.google.com/trends/explore?date=today%201-m&geo=US&q=tesla
if there is sufficient interest I can submit a pull request to one of these files.
https://github.com/GeneralMills/pytrends/blob/master/README.md or https://github.com/GeneralMills/pytrends/blob/master/examples/example.py