google-images-download
google-images-download copied to clipboard
Feature request: return image path even with thumbnail_only option set
Hey, It would be great if you get the absolut image path returned, even if you have thumbnail_only set. I think you could do that by changing the if case in line 585 to:
if thumbnail_only:
return_image_name = str(image_url[(image_url.rfind('/')) + 1:])
absolute_path = os.path.abspath(main_directory + "/" + dir_name + " - thumbnail" + "/" + return_image_name)
return "success", "Skipping image download...", return_image_name, absolute_path
But then you have the problem, that the return_image_name ist not sanitized (i.e. "carrot.jpg?itok=MrGiGvSb'" needs to be "carrot.jpg"). To do this you could move the lines 603-623 up to the top of the method (line 579). Then the first the method would do is to sanitize the image name.
Greetings, therealpeterpython