Iceloof / GoogleNews

Script for GoogleNews
https://pypi.org/project/GoogleNews/
MIT License
314 stars 88 forks source link

HTTP Error 429: Too Many Requests #91

Closed YashK07 closed 2 years ago

YashK07 commented 2 years ago

I am receiving this error frequently on fetching news in google colab. error

HurinHu commented 2 years ago

You should set delay between calls, high frequency requests will easily receive this error. And avoid running it on cloud server which will easily blocked by Google. Any abnormal activities may recognized as robot by Google and blocked IP.

YashK07 commented 2 years ago

What should be an ideal time gap between two calls? Because I am receiving the same error even on providing a time gap of 5 seconds. And I am running it on my local system only.

HurinHu commented 2 years ago

What should be an ideal time gap between two calls? Because I am receiving the same error even on providing a time gap of 5 seconds. And I am running it on my local system only.

There is no specific interval time, if you can get results at the first time, them you may need to increase delay time or switching IP if possible. Google is not provided this service as API or allowed people to fetch results through programs, that means all the programs may recognize as robot or abnormal traffic and Google can block it based on its rule, and we don't know the exact details of the rules.