-
Notifications
You must be signed in to change notification settings - Fork 0
19. How To's
Initiating this page to keep a record of tips and tricks other team members might find handy in their work.
Original URL: https://drive.google.com/file/d/**0B6wwyazyzml-OGQ3VUo0Z2thdmc**/view
You need to copy the ID from the original URL (the characters between the /d/ and /view), and use it in this URL:
https://drive.google.com/uc?export=view&id=**0B6wwyazyzml-OGQ3VUo0Z2thdmc**
- Using WGET
Create a folder in your machine.
Place your text file of images URL in the folder.
cd to that folder.
Use wget -i images.txt
You will find all your downloaded files in the folder.
- Using Python
`import requests
urls = pd.read_csv(r"cat_urls.csv") #save the url list as a dataframe
#putting r before your normal string converts a normal string to a raw string
rows = []
for index, i in urls.iterrows(): rows.append(i[-1]) counter = 0 for i in rows:
file_name = 'cat' + str(counter) + '.jpg'
print(file_name)
response = requests.get(i)
file = open(file_name, "wb")
file.write(response.content)
file.close()
counter += 1`