mirror of
https://github.com/searxng/searxng.git
synced 2025-07-13 16:29:17 +02:00
[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>
This commit is contained in:
parent
96a2eec3b5
commit
4d4aa13e1f
8 changed files with 31 additions and 217 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue