Last active
June 29, 2023 10:53
-
-
Save AlgorithmAlchemy/0f93fd97f88516a54e2d6adf96a1f91c to your computer and use it in GitHub Desktop.
proxy double
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while True: | |
r = requests.get(url1, headers=HEADERS, params=PARAMS, proxies=PROXY[pr_count]) | |
print(r.status_code) | |
if r.status_code == 429: | |
pr_count += 1 | |
r = requests.get(url1, headers=HEADERS, params=PARAMS, proxies=PROXY[pr_count]) | |
print(r.status_code) | |
pr_count = 0 | |
if r.status_code == 429: | |
time.sleep(120) | |
continue | |
else: | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment