Skip to content

Instantly share code, notes, and snippets.

@aymericdelab
Created October 16, 2019 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aymericdelab/b0bbc4da24f849014f9ff6dcbdaf5e3a to your computer and use it in GitHub Desktop.
Save aymericdelab/b0bbc4da24f849014f9ff6dcbdaf5e3a to your computer and use it in GitHub Desktop.
from google_images_download import google_images_download
downloader=google_images_download.googleimagesdownload()
## if we want to retrieve more than 100 images from google drive we need to download chromedriver
cd_path='C:\Program Files\chromedriver_win32\chromedriver.exe'
output_dir=r'./data/google/'
founders=['Jeff Bezos','Larry Page','Bill Gates']
for founder in founders:
arguments = {"keywords":founder,
"limit":600,
"print_urls":True,
"output_directory":output_dir,
"chromedriver":cd_path,
"format":'jpg',
"type": 'face'}
paths = downloader.download(arguments) #passing the arguments to the function
print(paths) #printing absolute paths of the downloaded images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment