I write a program in python and want to check the internetconnection in a loop. i do this with requests modul in python and all works fine but my question is, how many requests are allowed per day, or hour. At the moment i check the connection every 2 seconds so every 2 seconds google gets a request from my ip. Thats make more than 40,000 requests a day, if my software runs 24 hours. Is this a problem? I cant use proxies because i will not have access or control about the computer or settings of them when my software finally runs by the customer.
Asked
Active
Viewed 445 times
0
-
Does this answer your question? [Test if an internet connection is present in python](https://stackoverflow.com/questions/20913411/test-if-an-internet-connection-is-present-in-python) – JoelCrypto Jun 03 '22 at 10:49
-
No not really. There are just some other codesnippits to check the connection but no answer about blocking or something like that by to many requests. – Robert Jun 03 '22 at 12:36
-
But you only want to check connection right? – JoelCrypto Jun 03 '22 at 12:43
-
My program is checking but I want to know how many checks (requests) I can make until mit IP will be blocked. – Robert Jun 03 '22 at 12:46
-
1Why not Ping at random? – JoelCrypto Jun 03 '22 at 13:00
-
random? You mean a list with some adresses and randomly check? I think its a good idea. Any objections? – Robert Jun 03 '22 at 13:26
1 Answers
0
There are rate limits on all google public and internal apis.
However, documentation does not clearly spell out whats the exact rate limit on google.com
If you want to check connectivity, it might be better to use DNS servers such as 1.1.1.1
If you want programmatic access to google.com, you should rather use search API at https://developers.google.com/custom-search/v1/overview

DebSen
- 49
- 5
-
i changed google to 1.1.1.1. I will see what happens if something happens. Thank you. – Robert Jun 03 '22 at 13:24