Bläddra i källkod

Merge pull request #122 from pointhi/bugfix

[fix] #121, HTTP 500 Error if res["content"] == None
Adam Tauber 10 år sedan
förälder
incheckning
ee8cabf496
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1
    1
      searx/search.py

+ 1
- 1
searx/search.py Visa fil

@@ -131,7 +131,7 @@ def score_results(results):
131 131
         weight = 1.0
132 132
 
133 133
         # strip multiple spaces and cariage returns from content
134
-        if 'content' in res:
134
+        if res.get('content'):
135 135
             res['content'] = re.sub(' +', ' ',
136 136
                                     res['content'].strip().replace('\n', ''))
137 137