mirror of
https://github.com/searxng/searxng.git
synced 2025-07-24 21:59:22 +02:00
Add thumbnails in images results
- Modify engines to create/fetch an URL for the thumbnails - Modify themes to show thumbnails instead of full images. In Courgette, the result is not very beautiful. Should we change it ?
This commit is contained in:
parent
edd9d31180
commit
cb4a3fe598
9 changed files with 44 additions and 8 deletions
|
@ -43,15 +43,18 @@ def response(resp):
|
|||
|
||||
# parse results
|
||||
for result in search_res['responseData']['results']:
|
||||
print result
|
||||
href = result['originalContextUrl']
|
||||
title = result['title']
|
||||
if not result['url']:
|
||||
continue
|
||||
thumbnail_src = result['tbUrl']
|
||||
|
||||
# append result
|
||||
results.append({'url': href,
|
||||
'title': title,
|
||||
'content': '',
|
||||
'thumbnail_src': thumbnail_src,
|
||||
'img_src': unquote(result['url']),
|
||||
'template': 'images.html'})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue