1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-22 12:10:11 +01:00

[mod] content formatting

This commit is contained in:
asciimoo 2013-10-19 23:18:39 +02:00
parent 4e5624a507
commit b9cdad9178

View File

@ -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