From 4d4aa13e1f1d254e5d57c67973a7809d9c1e21f9 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 30 Dec 2022 18:28:02 +0100 Subject: [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 --- searx/autocomplete.py | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'searx/autocomplete.py') 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): -- cgit v1.2.3