Skip to content

Instantly share code, notes, and snippets.

@dmpeters
Created September 6, 2013 18:12
Show Gist options
  • Save dmpeters/6467684 to your computer and use it in GitHub Desktop.
Save dmpeters/6467684 to your computer and use it in GitHub Desktop.
url example list script
import requests
url_list = ['url1', 'url2', 'etc']
bad_urls = []
good_urls = []
for url in url_list:
r = requests.get(url)
if r.status_code == 404:
bad_urls.append(url)
else:
good_urls.append(url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment