forked from zaclys/searxng
[mod] content formatting
This commit is contained in:
parent
4e5624a507
commit
b9cdad9178
|
@ -21,6 +21,8 @@ def response(resp):
|
||||||
for result in search_res['responseData']['results']:
|
for result in search_res['responseData']['results']:
|
||||||
url = result['originalContextUrl']
|
url = result['originalContextUrl']
|
||||||
title = result['title']
|
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})
|
results.append({'url': url, 'title': title, 'content': content})
|
||||||
return results
|
return results
|
||||||
|
|
Loading…
Reference in New Issue