从网上抓取的图片想保存到本地,试了很多方法都实现不了,系统为mac。
images = ['http://www.xxx.com/01.jpg','http://www.xxx.com/01.jpg']
for image in images:
filename = random.randint(1,100)
local = r"~/Downloads/test/"
urllib.urlretrieve(image,local+filename+'.jpg')
images = ['http://www.xxx.com/01.jpg','http://www.xxx.com/01.jpg']
for image in images:
filename = random.randint(1,100)
local = r"~/Downloads/test/"
urllib.urlretrieve(image,local+filename+'.jpg')
