1
0
mirror of https://github.com/searx/searx synced 2024-11-05 18:22:43 +01:00

[fix] handling missing github descriptions

This commit is contained in:
asciimoo 2013-10-23 12:24:09 +02:00
parent e2c099088d
commit 708fa6f88a

View File

@ -21,6 +21,9 @@ def response(resp):
for res in search_res['items']:
title = res['name']
url = res['html_url']
content = escape(res['description'][:500])
if res['description']:
content = escape(res['description'][:500])
else:
content = ''
results.append({'url': url, 'title': title, 'content': content})
return results