Commit dd29120e authored by Brandon's avatar Brandon

print exception info

parent eb7fd492
......@@ -68,17 +68,18 @@ def check_url(page):
continue
if not validators.url(url):
print("INVALID: {}".format(url))
print("INVALID: {}".format(url))
continue
try:
if url not in goodlist:
requests.get(url, timeout=32)
requests.get(url, timeout=60)
goodlist.append(url)
print("OK: {}".format(url))
except requests.exceptions.ConnectionError:
except requests.exceptions.ConnectionError as ex:
print("BAD: ", url)
print("INFO:", ex)
badlist.append(url)
else:
break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment