python2 urllib urllib2
pyhton3 urllib ( urllib2 -> urllib.request )
1. download image given url
urllib.urlretrieve(url, filename2save)
with open(filename2save, 'wb+') as f :
f.write( urllib2.urlopen(url).read() )
python2 urllib urllib2
pyhton3 urllib ( urllib2 -> urllib.request )
1. download image given url
urllib.urlretrieve(url, filename2save)
with open(filename2save, 'wb+') as f :
f.write( urllib2.urlopen(url).read() )