summaryrefslogtreecommitdiff
path: root/searx/search.py
diff options
context:
space:
mode:
authorThomas Pointhuber <thomas.pointhuber@gmx.at>2014-11-01 17:32:26 +0100
committerThomas Pointhuber <thomas.pointhuber@gmx.at>2014-11-01 17:32:26 +0100
commit5a7f85eceef70dca1aef4f3899c5f9ab4975df22 (patch)
treea29e2f2dda5d7f55c1d5811dabfb527ee32fd631 /searx/search.py
parent58cc03351a10668da8aedd355d8b7da33057855a (diff)
downloadsearxng-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.py2
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', ''))