Open mikigom opened 6 years ago
the same go with "single_image", when "single_image" is set, other options like "output_directory" will not work. the image will be download to a directory name "downloads".
then I follow the the function single_image() in google-images-download, change the code a little as below, problem solved~
def single_image(self, arguments):
if arguments['output_directory']:
main_directory = arguments['output_directory']
else:
main_directory = "downloads"
extensions = ("jpeg", ".jpg", ".gif", ".png", ".bmp", ".svg", ".webp",
".ico")
url = arguments['single_image']
def main():
records = user_input()
for arguments in records:
if arguments['single_image']: # Download Single Image using a URL
response = googleimagesdownload()
response.single_image(arguments)
When -si option is used for inverse image search, many other options (e.g. -size, -format) are totally ignored.