Created
September 6, 2013 18:12
-
-
Save dmpeters/6467684 to your computer and use it in GitHub Desktop.
url example list script
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
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