Last active
September 26, 2018 06:42
-
-
Save JeyKJey/a33467fae4c9f7fac64f067501b484ac 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
try: | |
page_response = requests.get(page_link, timeout=5) | |
if page_response.status_code == 200: | |
# extract | |
else: | |
print(page_response.status_code) | |
# notify, try again | |
except requests.Timeout as e: | |
print("It is time to timeout") | |
print(str(e)) | |
except # other exception |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment