summaryrefslogtreecommitdiff
path: root/searx/engines/google_images.py
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2013-10-22 23:35:17 +0200
committerasciimoo <asciimoo@gmail.com>2013-10-22 23:35:17 +0200
commit0d6368a0923e7f10f6d971225e27c66e53197d00 (patch)
tree8a7b2e2d6e48a54c1da2a81851aba23c2dc806f8 /searx/engines/google_images.py
parent3a6d3e33778fb25dc64002a21681208d9fc509da (diff)
downloadsearxng-0d6368a0923e7f10f6d971225e27c66e53197d00.tar.gz
searxng-0d6368a0923e7f10f6d971225e27c66e53197d00.zip
[fix] skipping empty urls
Diffstat (limited to 'searx/engines/google_images.py')
-rwxr-xr-xsearx/engines/google_images.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/searx/engines/google_images.py b/searx/engines/google_images.py
index 2db4fb0e2..cacebeaf1 100755
--- a/searx/engines/google_images.py
+++ b/searx/engines/google_images.py
@@ -23,5 +23,7 @@ def response(resp):
for result in search_res['responseData']['results']:
url = result['originalContextUrl']
title = result['title']
+ if not result['url']:
+ continue
results.append({'url': url, 'title': title, 'content': '', 'img_src': result['url'], 'template': 'images.html'})
return results