Browse Source

[fix] #121, HTTP 500 Error if res["content"] == None

Thomas Pointhuber 10 years ago
parent
commit
5a7f85ecee
1 changed files with 1 additions and 1 deletions
  1. 1 1
      searx/search.py

+ 1 - 1
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', ''))