diff options
author | asciimoo <asciimoo@gmail.com> | 2013-10-23 12:24:09 +0200 |
---|---|---|
committer | asciimoo <asciimoo@gmail.com> | 2013-10-23 12:24:09 +0200 |
commit | 708fa6f88af8a2e0fa1a02e1603c6b231e68b212 (patch) | |
tree | f1d9d0c2fa33e512a4f891baff75090538aaf3b9 /searx/engines/github.py | |
parent | e2c099088dcd4e70b8b60189a3f41a8498c3cb8c (diff) | |
download | searxng-708fa6f88af8a2e0fa1a02e1603c6b231e68b212.tar.gz searxng-708fa6f88af8a2e0fa1a02e1603c6b231e68b212.zip |
[fix] handling missing github descriptions
Diffstat (limited to 'searx/engines/github.py')
-rw-r--r-- | searx/engines/github.py | 5 |
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 |