Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[fix] handling missing github descriptions

asciimoo708fa6f88af8
diff --git a/searx/engines/github.py b/searx/engines/github.py
index 591fd14a7..85540056c 100644
--- a/searx/engines/github.py
+++ b/searx/engines/github.py
@@ -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