2
0
mirror of https://github.com/searx/searx synced 2025-08-31 14:38:23 +00:00

Merge pull request #1545 from MarcAbonce/fix_duplicated_query

[fix] Stop engine from sending duplicated requests
This commit is contained in:
Alexandre Flament
2019-04-09 03:06:17 +02:00
committed by GitHub

View File

@@ -113,19 +113,16 @@ class RawTextQuery(object):
parse_next = True
engine_name = engine_shortcuts[prefix]
if engine_name in engines:
for engine_category in engines[engine_name].categories:
self.engines.append({'category': engine_category,
'name': engine_name,
'from_bang': True})
self.engines.append({'category': 'none',
'name': engine_name,
'from_bang': True})
# check if prefix is equal with engine name
elif prefix in engines:
parse_next = True
if prefix in engines:
for engine_category in engines[prefix].categories:
self.engines.append({'category': engine_category,
'name': prefix,
'from_bang': True})
self.engines.append({'category': 'none',
'name': prefix,
'from_bang': True})
# check if prefix is equal with categorie name
elif prefix in categories: