summaryrefslogtreecommitdiff
path: root/searx/engines/google_images.py
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2013-10-19 23:18:39 +0200
committerasciimoo <asciimoo@gmail.com>2013-10-19 23:18:39 +0200
commitb9cdad9178608ffc4ea2072e3ecc033e9cc3e996 (patch)
tree675a0bbf996f8b80cd71e9964e3626c37527518a /searx/engines/google_images.py
parent4e5624a50771e8ed71d2fb7c3357df98131c0202 (diff)
downloadsearxng-b9cdad9178608ffc4ea2072e3ecc033e9cc3e996.tar.gz
searxng-b9cdad9178608ffc4ea2072e3ecc033e9cc3e996.zip
[mod] content formatting
Diffstat (limited to 'searx/engines/google_images.py')
-rwxr-xr-xsearx/engines/google_images.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/searx/engines/google_images.py b/searx/engines/google_images.py
index 4ca3fe445..7294b8ad2 100755
--- a/searx/engines/google_images.py
+++ b/searx/engines/google_images.py
@@ -21,6 +21,8 @@ def response(resp):
for result in search_res['responseData']['results']:
url = result['originalContextUrl']
title = result['title']
- content = result['content']+'<br /><a href="%s"><img src="%s" title="%s" style="max-width: 500px; "/></a>' % (result['url'], result['url'], title)
+ content = '<a href="%s"><img src="%s" title="%s" style="max-width: 500px; "/></a>' % (result['url'], result['url'], title)
+ if result['content']:
+ content += '<br />'+result['content']
results.append({'url': url, 'title': title, 'content': content})
return results