Skip to content

Instantly share code, notes, and snippets.

@mattyjones
Created January 23, 2020 16:19
Show Gist options
  • Save mattyjones/32f1d4ef1388160d1cfd7c4ade0ef71d to your computer and use it in GitHub Desktop.
Save mattyjones/32f1d4ef1388160d1cfd7c4ade0ef71d to your computer and use it in GitHub Desktop.
# tested with Python >=3.6
import urllib.request
def check_url(url):
ret = urllib.request.urlopen(url)
if ret.code == 200:
c = True
else:
c = False
return c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment