mirror of
https://github.com/searxng/searxng.git
synced 2024-11-19 02:40:11 +01:00
[fix] handling missing github descriptions
This commit is contained in:
parent
e2c099088d
commit
708fa6f88a
@ -21,6 +21,9 @@ def response(resp):
|
|||||||
for res in search_res['items']:
|
for res in search_res['items']:
|
||||||
title = res['name']
|
title = res['name']
|
||||||
url = res['html_url']
|
url = res['html_url']
|
||||||
|
if res['description']:
|
||||||
content = escape(res['description'][:500])
|
content = escape(res['description'][:500])
|
||||||
|
else:
|
||||||
|
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
Block a user