Created
November 2, 2020 08:39
-
-
Save yushulx/962567eb439bf7b6a27078b0eb1751a6 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 | |
import argparse | |
ap = argparse.ArgumentParser() | |
ap.add_argument("-k", "--keywords", required=True, | |
help="The keywords/key phrases you want to search for.") | |
ap.add_argument("-l", "--limit", required=True, | |
help="The number of images that you want to download.") | |
args = vars(ap.parse_args()) | |
response = google_images_download.googleimagesdownload() | |
arguments = {"keywords":args["keywords"],"limit":args["limit"],"print_urls":True} | |
paths = response.download(arguments) | |
print(paths) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment