summaryrefslogtreecommitdiff
path: root/searx/autocomplete.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2022-12-30 18:28:02 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2023-03-24 10:37:42 +0100
commit4d4aa13e1f1d254e5d57c67973a7809d9c1e21f9 (patch)
tree1d3399dd2c7bb8475fac92c08681abb5096e9e1e /searx/autocomplete.py
parent96a2eec3b5e20afda89d9e3a81b09ca1612dc186 (diff)
downloadsearxng-4d4aa13e1f1d254e5d57c67973a7809d9c1e21f9.tar.gz
searxng-4d4aa13e1f1d254e5d57c67973a7809d9c1e21f9.zip
[mod] remove obsolete EngineTraits.supported_languages
All engines has been migrated from ``supported_languages`` to the ``fetch_traits`` concept. There is no longer a need for the obsolete code that implements the ``supported_languages`` concept. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/autocomplete.py')
-rw-r--r--searx/autocomplete.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/searx/autocomplete.py b/searx/autocomplete.py
index d659d110f..ad9903f36 100644
--- a/searx/autocomplete.py
+++ b/searx/autocomplete.py
@@ -19,9 +19,6 @@ from searx.engines import (
from searx.network import get as http_get
from searx.exceptions import SearxEngineResponseException
-# a fetch_supported_languages() for XPath engines isn't available right now
-# _brave = ENGINES_LANGUAGES['brave'].keys()
-
def get(*args, **kwargs):
if 'timeout' not in kwargs:
@@ -225,14 +222,6 @@ def search_autocomplete(backend_name, query, sxng_locale):
backend = backends.get(backend_name)
if backend is None:
return []
-
- if engines[backend_name].traits.data_type != "traits_v1":
- # vintage / deprecated
- if not sxng_locale or sxng_locale == 'all':
- sxng_locale = 'en'
- else:
- sxng_locale = sxng_locale.split('-')[0]
-
try:
return backend(query, sxng_locale)
except (HTTPError, SearxEngineResponseException):