Skip to content

Instantly share code, notes, and snippets.

@betatim
Created March 30, 2020 20:56
Show Gist options
  • Save betatim/a80e6dab38fd311a0d8a66fa4633dccb to your computer and use it in GitHub Desktop.
Save betatim/a80e6dab38fd311a0d8a66fa4633dccb to your computer and use it in GitHub Desktop.
Highly scientific rate limit checker
import requests
import time
S = requests.Session()
now = time.time()
while True:
r = S.get(YOUR_HOST_HERE)
now_ = time.time()
delta_t = now_ - now
now = now_
print('rating at', 1/delta_t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment