summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorNoémi Ványi <sitbackandwait@gmail.com>2017-11-03 19:52:47 +0100
committerNoémi Ványi <sitbackandwait@gmail.com>2017-11-03 19:52:47 +0100
commit59c02e8e5fc54f49c279bde68afd8e0de71b7d16 (patch)
treed7e61c86d4c0210a23ad824919e05a59280d45ee /searx
parent7a9b18e9e9847252549408108ec72c1c8d2296b7 (diff)
downloadsearxng-59c02e8e5fc54f49c279bde68afd8e0de71b7d16.tar.gz
searxng-59c02e8e5fc54f49c279bde68afd8e0de71b7d16.zip
results: make engines of results set
Previously, if a same result was returned from the same engine, the name of the engine would be added more than once. To eliminate engine name duplication engine list was changed to set.
Diffstat (limited to 'searx')
-rw-r--r--searx/results.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/results.py b/searx/results.py
index 19404aec1..1939b9483 100644
--- a/searx/results.py
+++ b/searx/results.py
@@ -197,7 +197,7 @@ class ResultContainer(object):
result['parsed_url'] = result['parsed_url']._replace(scheme="http")
result['url'] = result['parsed_url'].geturl()
- result['engines'] = [result['engine']]
+ result['engines'] = set([result['engine']])
# strip multiple spaces and cariage returns from content
if result.get('content'):
@@ -227,7 +227,7 @@ class ResultContainer(object):
duplicated['positions'].append(position)
# add engine to list of result-engines
- duplicated['engines'].append(result['engine'])
+ duplicated['engines'].add(result['engine'])
# using https if possible
if duplicated['parsed_url'].scheme != 'https' and result['parsed_url'].scheme == 'https':