Created
October 25, 2016 05:48
-
-
Save liezl200/063a8aea7637227ae32667dc6935d5e9 to your computer and use it in GitHub Desktop.
Download missing photo files
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 urllib2 | |
urllist = ['http://pasuship.weebly.com/uploads/8/6/5/6/86560728/dsc-0056-2_orig.jpg', | |
'http://pasuship.weebly.com/uploads/8/6/5/6/86560728/slack-for-ios-upload_1_orig.jpg', | |
'http://pasuship.weebly.com/uploads/8/6/5/6/86560728/14202558-1284135198285907-370006575151434573-n_orig.jpg', | |
'http://pasuship.weebly.com/uploads/8/6/5/6/86560728/jasmineheu_orig.jpg', | |
'http://pasuship.weebly.com/uploads/8/6/5/6/86560728/photo-oct-17-11-11-30-am_orig.jpeg', | |
'http://pasuship.weebly.com/uploads/8/6/5/6/86560728/img-7797_orig.jpeg', | |
'http://pasuship.weebly.com/uploads/8/6/5/6/86560728/img-0039_orig.jpg', | |
'http://pasuship.weebly.com/uploads/8/6/5/6/86560728/img-7850_orig.jpg', | |
'http://pasuship.weebly.com/uploads/8/6/5/6/86560728/image_orig.png', | |
'http://pasuship.weebly.com/uploads/8/6/5/6/86560728/rodel-studios-ysabel-debut-029_orig.jpg', | |
'http://pasuship.weebly.com/uploads/8/6/5/6/86560728/blake-villanueva_orig.jpg', | |
'http://pasuship.weebly.com/uploads/8/6/5/6/86560728/1ff29df8-b4e7-4b6b-8109-11a4b6203dce_orig.jpg', | |
'http://pasuship.weebly.com/uploads/8/6/5/6/86560728/img-20161021-150236_orig.jpg', | |
'http://pasuship.weebly.com/uploads/8/6/5/6/86560728/img-5311_orig.jpg', | |
'http://pasuship.weebly.com/uploads/8/6/5/6/86560728/20161009-110254-2_orig.jpg', | |
'http://pasuship.weebly.com/uploads/8/6/5/6/86560728/img-3242_orig.jpg', | |
'http://pasuship.weebly.com/uploads/8/6/5/6/86560728/image1_orig.jpg', | |
'http://pasuship.weebly.com/uploads/8/6/5/6/86560728/img-3844_orig.jpg'] | |
for url in urllist: | |
response = urllib2.urlopen(url) | |
data = response.read() | |
filename = url.split('/')[-1] | |
file_ = open(filename, 'w') | |
file_.write(data) | |
file_.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment