Skip to content

Instantly share code, notes, and snippets.

@mauritsvdvijgh
Created January 12, 2018 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mauritsvdvijgh/25ec10c638c4f1b1ff52481ef479d756 to your computer and use it in GitHub Desktop.
Save mauritsvdvijgh/25ec10c638c4f1b1ff52481ef479d756 to your computer and use it in GitHub Desktop.
import time
import requests
url_format = "https://permanent-redirect.xyz/pages/{}"
last_epoch = 0
while True:
epoch = int(time.time())
if epoch != last_epoch:
url = url_format.format(epoch)
r = requests.get(url)
print(url, r.status_code)
if r.status_code == 200:
break
last_epoch = epoch
print("Found the art:", url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment