Links

Download Image from URL

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)