From cb4a3fe598707fc42f86ea3f7bcf517dcd4db660 Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Sat, 17 Jan 2015 19:21:09 +0100 Subject: Add thumbnails in images results - Modify engines to create/fetch an URL for the thumbnails - Modify themes to show thumbnails instead of full images. In Courgette, the result is not very beautiful. Should we change it ? --- searx/engines/google_images.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'searx/engines/google_images.py') diff --git a/searx/engines/google_images.py b/searx/engines/google_images.py index 79fac3fb0..c08279660 100644 --- a/searx/engines/google_images.py +++ b/searx/engines/google_images.py @@ -43,15 +43,18 @@ def response(resp): # parse results for result in search_res['responseData']['results']: + print result href = result['originalContextUrl'] title = result['title'] if not result['url']: continue + thumbnail_src = result['tbUrl'] # append result results.append({'url': href, 'title': title, 'content': '', + 'thumbnail_src': thumbnail_src, 'img_src': unquote(result['url']), 'template': 'images.html'}) -- cgit v1.2.3