summaryrefslogtreecommitdiff
path: root/searx/engines/google_images.py
diff options
context:
space:
mode:
authorCqoicebordel <Cqoicebordel@users.noreply.github.com>2015-01-31 16:16:30 +0100
committerCqoicebordel <Cqoicebordel@users.noreply.github.com>2015-01-31 16:16:30 +0100
commitd5b8005ee10054b5260f57c1800ddebfa03c39cf (patch)
treed4c9bc300307387e3f00fc110149d8027e8e9bb7 /searx/engines/google_images.py
parent8ea749d6ec0b711c516f3dbdb34a1bd17ae7d945 (diff)
downloadsearxng-d5b8005ee10054b5260f57c1800ddebfa03c39cf.tar.gz
searxng-d5b8005ee10054b5260f57c1800ddebfa03c39cf.zip
Google images' unit test
Diffstat (limited to 'searx/engines/google_images.py')
-rw-r--r--searx/engines/google_images.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/searx/engines/google_images.py b/searx/engines/google_images.py
index cc62a4fd2..092ae6639 100644
--- a/searx/engines/google_images.py
+++ b/searx/engines/google_images.py
@@ -18,7 +18,7 @@ paging = True
# search-url
url = 'https://ajax.googleapis.com/'
-search_url = url + 'ajax/services/search/images?v=1.0&start={offset}&rsz=large&safe=off&filter=off&{query}' # noqa
+search_url = url + 'ajax/services/search/images?v=1.0&start={offset}&rsz=large&safe=off&filter=off&{query}'
# do search-request
@@ -45,14 +45,14 @@ def response(resp):
for result in search_res['responseData']['results']:
href = result['originalContextUrl']
title = result['title']
- if not result['url']:
+ if 'url' not in result:
continue
thumbnail_src = result['tbUrl']
# append result
results.append({'url': href,
'title': title,
- 'content': '',
+ 'content': result['content'],
'thumbnail_src': thumbnail_src,
'img_src': unquote(result['url']),
'template': 'images.html'})