Created
January 12, 2018 15:09
-
-
Save mauritsvdvijgh/25ec10c638c4f1b1ff52481ef479d756 to your computer and use it in GitHub Desktop.
This file contains 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
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