GeneralMills / pytrends

Pseudo API for Google Trends
Other
3.12k stars 798 forks source link

I am interested in reverse engineering Google trends #619

Open AhmadKhanSenpai opened 2 months ago

AhmadKhanSenpai commented 2 months ago

Hi, As you all know that its been 4 months pytrend is not working for anybody unless you use browser automation which takes very long time. I was reading the source code and debugging to see where the problem actually occurs and why we are getting "Error 429 Too many Requests". So far I found out that pytrend is unable to get coockies for its requests, in debugging the cookie variable stays empty. And I think google is also encrypting the requirement "req=" parameter as well, which is why we get response 400 if we try to send request through postman or Insomnia or python request module. So far I have no Idea what we can do unless we hack the website to get "token" and then send our request with that "token". I think Google trends security level have reached to a level of Bank website.

If anyone have an insight to share please do. Maybe we can figure something out together.

nick0h commented 1 month ago

i just started reversing the flow i have been only working on it today but made alright progress contact me if you're interested in this , i figured out how to get tokens but they aren't working as i would expect, it may have something to do with having to send an empty post where i see in browser there is some random long string, but maybe not. Anyways I am gonna figure this out so lmk if you're interested