Skip to content

Latest commit

 

History

History
54 lines (31 loc) · 1.58 KB

Python_Download_Image_from_URL.md

File metadata and controls

54 lines (31 loc) · 1.58 KB



Template request | Bug report | Generate Data Product

Tags: #python #image #url #naas #snippet

Author: Abraham Israel

Description: This notebook provides a step-by-step guide to downloading an image from a URL using Python.

Input

Import libraries

try:
    import wget
except:
    !pip install wget
    import wget

Setup Variables

image_url = "https://i0.wp.com/thenerddaily.com/wp-content/uploads/2018/08/Reasons-To-Watch-Anime.jpg"

Model

Download Image

image_name = wget.download(image_url)

Output

Display result

print("Image downloaded: /", image_name)

from IPython.display import Image

Image(filename=image_name)