We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems that the filename is generated from the IMG URL, how to rename the file with the keyword input?
response = google_images_download.googleimagesdownload() arguments = {"keywords":"cat, dog", "limit":1, "print_urls":True, "image_directory":'home1', "size":"large"}
Item no.: 1 --> Item name = cat Evaluating... Starting Download... Image URL: https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg Completed Image ====> 1. 1200px-cat03.jpg Expected filename: cat.jpg Errors: 0
Item no.: 2 --> Item name = dog Evaluating... Starting Download... Image URL: https://i.ytimg.com/vi/SfLV8hD7zX4/maxresdefault.jpg Completed Image ====> 1. maxresdefault.jpg Expected filename: dog.jpg Errors: 0
The text was updated successfully, but these errors were encountered:
any answers was commited in this question?
Sorry, something went wrong.
any answers ?
You have input arguments to set prefix, suffix and/or numbering to file names.
If you want other way to name the result images, you can edit code.
if no_numbering: path = main_directory + "/" + dir_name + "/" + prefix + image_name else: path = main_directory + "/" + dir_name + "/" + prefix + str(count) + "." + image_name try: output_file = open(path, 'wb')
Source
No branches or pull requests
It seems that the filename is generated from the IMG URL, how to rename the file with the keyword input?
response = google_images_download.googleimagesdownload()
arguments = {"keywords":"cat, dog", "limit":1, "print_urls":True, "image_directory":'home1', "size":"large"}
Item no.: 1 --> Item name = cat
Evaluating...
Starting Download...
Image URL: https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg
Completed Image ====> 1. 1200px-cat03.jpg
Expected filename: cat.jpg
Errors: 0
Item no.: 2 --> Item name = dog
Evaluating...
Starting Download...
Image URL: https://i.ytimg.com/vi/SfLV8hD7zX4/maxresdefault.jpg
Completed Image ====> 1. maxresdefault.jpg
Expected filename: dog.jpg
Errors: 0
The text was updated successfully, but these errors were encountered: