google-images-download
google-images-download copied to clipboard
Unicode Decode Error on Accented Spanish Characters
I get the error below when trying to search for images using keywords with Spanish characters like á, ó, and í. The error occurs when using the library from my own code or with the command line utility. I'm using Python 3.
The issue is related to line 922 in google_images_download.py file:
print(iteration.encode('raw_unicode_escape').decode('utf-8'))
@hardikvasa on commit 18cc56b3ed8e06148fbacaf98b37a24c3f4a635c why did you have to add the encode/decode ? Without this it will also work for non english characters.
Here is my fix for this
try:
print(iteration.encode('raw_unicode_escape').decode('utf-8'))
except:
print(iteration.encode('raw_unicode_escape').decode('latin-1'))