使用python自带的urllib库下载图片
源代码:
import urllib
import time
import Image
img_folder = "D:\\image\\"
url = "http://img.kuaizitech.com/dc/e5/e584ab32c35066dcd554b09acb947821.jpg"
urls = url.split("/")
content = urllib.urlopen(url).read()
path = img_folder+str(time.time())+"."+urls[-1]
f= file(path,"wb")
f.write(content)