| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -704,6 +704,8 @@ def http_request( | |||
| 704 | 704 | wait_time = 2 ** cur_retries * 0.1 | |
| 705 | 705 | if "Retry-After" in result.headers: | |
| 706 | 706 | wait_time = int(result.headers["Retry-After"]) | |
| 707 | + elif "RateLimit-Reset" in result.headers: | ||
| 708 | + wait_time = int(result.headers["RateLimit-Reset"]) - time.time() | ||
| 707 | 709 | cur_retries += 1 | |
| 708 | 710 | time.sleep(wait_time) | |
| 709 | 711 | continue | |
| Back | FazBrowse Home | New Git URL |
0 commit comments