소스 검색

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

Thomas Pointhuber 11 년 전
부모
커밋
5a7f85ecee
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      searx/search.py

+ 1
- 1
searx/search.py 파일 보기

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