Skip to content

Instantly share code, notes, and snippets.

@Deathcrash
Last active June 29, 2023 10:53
Show Gist options
  • Save Deathcrash/0f93fd97f88516a54e2d6adf96a1f91c to your computer and use it in GitHub Desktop.
Save Deathcrash/0f93fd97f88516a54e2d6adf96a1f91c to your computer and use it in GitHub Desktop.
proxy double
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