Skip to content

Instantly share code, notes, and snippets.

View hellyeah's full-sized avatar

David Fontenot hellyeah

View GitHub Profile
import requests
sites = get_sites_from_db()
for s in sites:
try:
r = requests.head(s)
if r.status_code in [404,500]:
remove_site_from_db(s)
except Exception: