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] don't raise fatal exception when engine isn't available
Markus Heiser3f3083164096
diff --git a/searx/search/__init__.py b/searx/search/__init__.pyindex 62539579c..e4282512b 100644--- a/searx/search/__init__.py+++ b/searx/search/__init__.py@@ -22,7 +22,7 @@ from searx.network import initialize as initialize_network, check_network_configfrom searx.results import ResultContainerfrom searx.search.checker import initialize as initialize_checkerfrom searx.search.processors import PROCESSORS-+from searx.search.processors.abstract import RequestParamsif t.TYPE_CHECKING:from .models import SearchQuery@@ -79,16 +79,20 @@ class Search:return bool(results)# do search-request- def _get_requests(self) -> tuple[list[tuple[str, str, dict[str, t.Any]]], int]:+ def _get_requests(self) -> tuple[list[tuple[str, str, RequestParams]], float]:# init vars- requests: list[tuple[str, str, dict[str, t.Any]]] = []+ requests: list[tuple[str, str, RequestParams]] = []# max of all selected engine timeoutdefault_timeout = 0# start search-request for all selected enginesfor engineref in self.search_query.engineref_list:- processor = PROCESSORS[engineref.name]+ processor = PROCESSORS.get(engineref.name)+ if not processor:+ # engine does not exists; not yet or the 'init' method of the+ # engine has been failed and the engine has not been registered.+ continue# stop the request now if the engine is suspendif processor.extend_container_if_suspended(self.result_container):@@ -133,7 +137,7 @@ class Search:return requests, actual_timeout- def search_multiple_requests(self, requests: list[tuple[str, str, dict[str, t.Any]]]):+ def search_multiple_requests(self, requests: list[tuple[str, str, RequestParams]]):# pylint: disable=protected-accesssearch_id = str(uuid4())