python download image

56

python download image from url -

import urllib.request
imgURL = "http://site.meishij.net/r/58/25/3568808/a3568808_142682562777944.jpg"

urllib.request.urlretrieve(imgURL, "D:/abc/image/local-filename.jpg")

download image python -

import requests
with open('00000001.jpg','wb') as f:
	f.write(requests.get('http://www.gunnerkrigg.com//comics/00000001.jpg').content)

Comments

Submit
0 Comments