Skip to content

Instantly share code, notes, and snippets.

View pg-goose's full-sized avatar
💭
Trying 🦆

aGoose pg-goose

💭
Trying 🦆
  • Piveu
  • Barcelona
View GitHub Profile
@pg-goose
pg-goose / download-image.py
Created November 29, 2020 11:05
Download image by URL [python | requests | wget]
import requests
import shutil
#Setting URL and image name
image_url = "##########URL TO DOWNLOAD"##########"
filename = image_url.split("/")[-1]
# Open the url image, set stream to True, this will return the stream content.
r = requests.get(image_url, stream = True)