瀏覽代碼

Merge pull request #1078 from kvch/result-engines-set

results: make engines of results set
Adam Tauber 7 年之前
父節點
當前提交
dd900b25a9
沒有帳戶連結到提交者的電子郵件
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      searx/results.py

+ 2
- 2
searx/results.py 查看文件

@@ -197,7 +197,7 @@ class ResultContainer(object):
197 197
             result['parsed_url'] = result['parsed_url']._replace(scheme="http")
198 198
             result['url'] = result['parsed_url'].geturl()
199 199
 
200
-        result['engines'] = [result['engine']]
200
+        result['engines'] = set([result['engine']])
201 201
 
202 202
         # strip multiple spaces and cariage returns from content
203 203
         if result.get('content'):
@@ -227,7 +227,7 @@ class ResultContainer(object):
227 227
             duplicated['positions'].append(position)
228 228
 
229 229
             # add engine to list of result-engines
230
-            duplicated['engines'].append(result['engine'])
230
+            duplicated['engines'].add(result['engine'])
231 231
 
232 232
             # using https if possible
233 233
             if duplicated['parsed_url'].scheme != 'https' and result['parsed_url'].scheme == 'https':