on master help sign in
[fix] handling missing github descriptions
708fa6fasciimoo
searx/engines/github.py+4−1
@@ -21,6 +21,9 @@ def response(resp):
21 for res in search_res['items']:
21 for res in search_res['items']:
22 title = res['name']
22 title = res['name']
23 url = res['html_url']
23 url = res['html_url']
24+ if res['description']:
24− content = escape(res['description'][:500])
25+ content = escape(res['description'][:500])
26+ else:
27+ content = ''
25 results.append({'url': url, 'title': title, 'content': content})
28 results.append({'url': url, 'title': title, 'content': content})
26 return results
29 return results