Created
March 20, 2020 20:13
-
-
Save aniruddha27/c12a9b985a26cf10075a3e9d68b979fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib | |
# function to save image from the passed URL | |
def download_img(url, i): | |
# folder = r'C:\Users\Dell\Desktop\Analytics Vidhya\Delhi\\' | |
folder = r'./Importing files/Delhi/' | |
# define the file path to store images | |
filepath = folder + str(i) +'.jpg' | |
# retrieve the image from the URL and save in the folder | |
urllib.request.urlretrieve(url,filepath) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment