diff options
| author | Adam Tauber <asciimoo@gmail.com> | 2014-11-01 17:49:18 +0100 |
|---|---|---|
| committer | Adam Tauber <asciimoo@gmail.com> | 2014-11-01 17:49:18 +0100 |
| commit | ee8cabf496a27030c4035266e92c792ce294b013 (patch) | |
| tree | a29e2f2dda5d7f55c1d5811dabfb527ee32fd631 | |
| parent | 58cc03351a10668da8aedd355d8b7da33057855a (diff) | |
| parent | 5a7f85eceef70dca1aef4f3899c5f9ab4975df22 (diff) | |
Merge pull request #122 from pointhi/bugfix
[fix] #121, HTTP 500 Error if res["content"] == None
| -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', '')) |