SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[fix] engine - qwant wrong error type
jazzzoooda1446c5ed05
diff --git a/searx/engines/qwant.py b/searx/engines/qwant.pyindex 0ffc6d1a9..30e7e237e 100644--- a/searx/engines/qwant.py+++ b/searx/engines/qwant.py@@ -50,7 +50,7 @@ from flask_babel import gettextimport babelimport lxml-from searx.exceptions import SearxEngineAPIException+from searx.exceptions import SearxEngineAPIException, SearxEngineTooManyRequestsExceptionfrom searx.network import raise_for_httperrorfrom searx.enginelib.traits import EngineTraits@@ -188,15 +188,11 @@ def parse_web_api(resp):# check for an API errorif search_results.get('status') != 'success':- msg = ",".join(- data.get(- 'message',- [- 'unknown',- ],- )- )- raise SearxEngineAPIException('API error::' + msg)+ error_code = data.get('error_code')+ if error_code == 24:+ raise SearxEngineTooManyRequestsException()+ msg = ",".join(data.get('message', ['unknown']))+ raise SearxEngineAPIException(f"{msg} ({error_code})")# raise for other errorsraise_for_httperror(resp)@@ -220,7 +216,6 @@ def parse_web_api(resp):return []for row in mainline:-mainline_type = row.get('type', 'web')if mainline_type != qwant_categ:continue