diff options
author | asciimoo <asciimoo@gmail.com> | 2013-10-19 23:18:39 +0200 |
---|---|---|
committer | asciimoo <asciimoo@gmail.com> | 2013-10-19 23:18:39 +0200 |
commit | b9cdad9178608ffc4ea2072e3ecc033e9cc3e996 (patch) | |
tree | 675a0bbf996f8b80cd71e9964e3626c37527518a /searx/engines/google_images.py | |
parent | 4e5624a50771e8ed71d2fb7c3357df98131c0202 (diff) | |
download | searxng-b9cdad9178608ffc4ea2072e3ecc033e9cc3e996.tar.gz searxng-b9cdad9178608ffc4ea2072e3ecc033e9cc3e996.zip |
[mod] content formatting
Diffstat (limited to 'searx/engines/google_images.py')
-rwxr-xr-x | searx/engines/google_images.py | 4 |
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 |