Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

x-raw-image #189

Closed
enricopal opened this issue Nov 19, 2018 · 2 comments
Closed

x-raw-image #189

enricopal opened this issue Nov 19, 2018 · 2 comments

Comments

@enricopal
Copy link

Hello,
I am using googleimagesdownload to get the URLs of images found on google.
I am using the CLI from within python and saving the printed URLs:

import subprocess
result = {'label': 'The Elements of Moral Philosophy', 'author': 'James Rachels'}
item_type = 'book'
out = subprocess.check_output(["googleimagesdownload", "--keywords", "\"%s %s %s\"" % (result['label'].replace(',',''), item_type, result['author']), "--print_urls", "-l", "1"])
url = out.decode('utf-8').split('\n')[4].replace('Image URL: ','') 

This works fine in general, but sometimes I get some weird results such as: x-raw-image:///c2cd85e815606ceef9f9926580a481686218ff8f1979e26816d1ba45f9eedeaa
which do not even seem to be URLs, they do not point to any image.

Does anyone have a clue where these results come from?
Thanks.
ENrico

@hardikvasa
Copy link
Owner

hardikvasa commented Apr 23, 2019

@enricopal the above example you provided works as expected when i test it on my end (mac, python2/3). Do you see issue in the example provided? or do you see unexpected image result with a different keyword or limit? Basically i am not able to reproduce this issue on my end and additional info would help me find out if there is any edge case scenario here.

hardikvasa added a commit that referenced this issue May 13, 2019
fix the bug where wrong image format is downloaded
addresses #81 #183 #189 #213
sphinx doc updates
@hardikvasa
Copy link
Owner

This is now resolved in cf5ff48

closing the issue.

SecorD0 pushed a commit to SecorD0/google-images-download that referenced this issue Dec 2, 2022
fix the bug where wrong image format is downloaded
addresses hardikvasa#81 hardikvasa#183 hardikvasa#189 hardikvasa#213
sphinx doc updates
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants