mirror of
https://github.com/searxng/searxng
synced 2024-11-05 06:01:05 +00:00
[fix] unsplash engine - 'searx:result: invalid title:'
- Use result 'alt_description' as title, if not given use default title 'unknown'. - Use result 'description' from unsplash as 'content' Fix error:: DEBUG:searx:result: invalid title: {..., 'title': None, 'content': '', 'engine': 'unsplash'} Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
a88e3e4fea
commit
dc21cb5d4b
@ -62,7 +62,8 @@ def response(resp):
|
||||
'url': clean_url(result['links']['html']),
|
||||
'thumbnail_src': clean_url(result['urls']['thumb']),
|
||||
'img_src': clean_url(result['urls']['raw']),
|
||||
'title': result['description'],
|
||||
'content': ''
|
||||
'title': result.get('alt_description') or 'unknown',
|
||||
'content': result.get('description') or ''
|
||||
})
|
||||
|
||||
return results
|
||||
|
Loading…
Reference in New Issue
Block a user