From eda8934f1548ed228d00a0196b61d35585ea11bc Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Fri, 18 Dec 2020 12:19:14 +0100 Subject: [mod] searx.search.EngineRef: remove from_bang parameter from_bang is True when the user query contains a bang. In this case the category is also set to 'none'. from_bang only usage was in searx.webadapter.parse_specific : if from_bang is True, then the EngineRef category is ignored and force to 'none'. This commit also removes the searx.webadapter.parse_sepecific function. --- searx/query.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'searx/query.py') diff --git a/searx/query.py b/searx/query.py index 422cd57b5..e61e24f2c 100644 --- a/searx/query.py +++ b/searx/query.py @@ -125,12 +125,12 @@ class RawTextQuery: searx_query_part = True engine_name = engine_shortcuts[prefix] if engine_name in engines: - self.enginerefs.append(EngineRef(engine_name, 'none', True)) + self.enginerefs.append(EngineRef(engine_name, 'none')) # check if prefix is equal with engine name elif prefix in engines: searx_query_part = True - self.enginerefs.append(EngineRef(prefix, 'none', True)) + self.enginerefs.append(EngineRef(prefix, 'none')) # check if prefix is equal with categorie name elif prefix in categories: -- cgit v1.2.3