Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib
- from time import sleep
- file1 = open('doggypix.txt')
- for g in file1:
- loadthis = g.strip()
- g = g.strip()
- while '/' in g:
- head, sep, tail = g.partition('/')
- g = tail
- print g,loadthis
- f = open(g,'wb')
- f.write(urllib.urlopen(loadthis).read())
- sleep(0.5)
- f.close()
- print "------------FINISHED-------------"
- """ Download files (eg jpg) listed in doggypix.txt """
Add Comment
Please, Sign In to add comment