diff options
author | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2014-11-01 17:32:26 +0100 |
---|---|---|
committer | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2014-11-01 17:32:26 +0100 |
commit | 5a7f85eceef70dca1aef4f3899c5f9ab4975df22 (patch) | |
tree | a29e2f2dda5d7f55c1d5811dabfb527ee32fd631 /searx/search.py | |
parent | 58cc03351a10668da8aedd355d8b7da33057855a (diff) | |
download | searxng-5a7f85eceef70dca1aef4f3899c5f9ab4975df22.tar.gz searxng-5a7f85eceef70dca1aef4f3899c5f9ab4975df22.zip |
[fix] #121, HTTP 500 Error if res["content"] == None
Diffstat (limited to 'searx/search.py')
-rw-r--r-- | searx/search.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/search.py b/searx/search.py index f051d6df2..0e7aaed8f 100644 --- a/searx/search.py +++ b/searx/search.py @@ -131,7 +131,7 @@ def score_results(results): weight = 1.0 # strip multiple spaces and cariage returns from content - if 'content' in res: + if res.get('content'): res['content'] = re.sub(' +', ' ', res['content'].strip().replace('\n', '')) |