From b973081134bcb8f727b178128224f4a7a741c3ad Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Mon, 8 Dec 2014 21:12:50 +0100 Subject: [PATCH] [fix] Google image with special chars It seems like Google image is doing a double urlencode on the url of the images. So we need to unquote once before sending to the browser the urls. It solves the 404 we could see with some image with specials chars in url. Exemple https://searx.laquadrature.net/?q=etes&pageno=1&category_images (there are two of those in the list) --- searx/engines/google_images.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/searx/engines/google_images.py b/searx/engines/google_images.py index 7b8b15b42..491f5c2c2 100644 --- a/searx/engines/google_images.py +++ b/searx/engines/google_images.py @@ -9,7 +9,7 @@ # @stable yes (but deprecated) # @parse url, title, img_src -from urllib import urlencode +from urllib import urlencode,unquote from json import loads # engine dependent config @@ -52,7 +52,7 @@ def response(resp): results.append({'url': href, 'title': title, 'content': '', - 'img_src': result['url'], + 'img_src': unquote(result['url']), 'template': 'images.html'}) # return results