Created
October 16, 2019 20:55
-
-
Save aymericdelab/b0bbc4da24f849014f9ff6dcbdaf5e3a 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
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