Created
July 18, 2016 19:02
-
-
Save epatr/a82c7acd0b8010a9e0e61d0eab353aa2 to your computer and use it in GitHub Desktop.
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 os | |
import urllib2 | |
print("Opening urls.txt...") | |
for url in open('urls.txt'): | |
filename = url.split('/')[-1].rstrip() | |
if not os.path.exists(filename): | |
print("Downloading"), | |
print filename | |
outfile = open(filename, "w") | |
outfile.write(urllib2.urlopen(url).read()) | |
outfile.close | |
print("Complete!") | |
print("All files are complete!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment