summaryrefslogtreecommitdiff
path: root/searx/engines/github.py
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2013-10-23 12:24:09 +0200
committerasciimoo <asciimoo@gmail.com>2013-10-23 12:24:09 +0200
commit708fa6f88af8a2e0fa1a02e1603c6b231e68b212 (patch)
treef1d9d0c2fa33e512a4f891baff75090538aaf3b9 /searx/engines/github.py
parente2c099088dcd4e70b8b60189a3f41a8498c3cb8c (diff)
downloadsearxng-708fa6f88af8a2e0fa1a02e1603c6b231e68b212.tar.gz
searxng-708fa6f88af8a2e0fa1a02e1603c6b231e68b212.zip
[fix] handling missing github descriptions
Diffstat (limited to 'searx/engines/github.py')
-rw-r--r--searx/engines/github.py5
1 files changed, 4 insertions, 1 deletions
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