Download image from website with python.

Ask a question+

I want to download all the image of a web page with the help of python.
Can anybody tell me how to do that?

add comment

1 Answer


import urllib.request

image_url = 'https://bit.ly/2XuVzB4' #The image on the web
save_name = 'my_image.jpg' # Local name (Will be saved in same folder as .py file)
urllib.request.urlretrieve(image_url, save_name)

This will download an image from the web with the help of Python.


add comment

Your Answer