.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
__init__ (self, engine, str engine_name) | |
initialize (self) | |
has_initialize_function (self) | |
handle_exception (self, result_container, exception_or_message, suspend=False) | |
extend_container (self, result_container, start_time, search_results) | |
extend_container_if_suspended (self, result_container) | |
get_params (self, search_query, engine_category) | |
search (self, query, params, result_container, start_time, timeout_limit) | |
get_tests (self) | |
get_default_tests (self) | |
Public Attributes | |
engine = engine | |
engine_name = engine_name | |
logger = engines[engine_name].logger | |
suspended_status = SUSPENDED_STATUS.setdefault(key, SuspendedStatus()) | |
Protected Member Functions | |
_extend_container_basic (self, result_container, start_time, search_results) | |
Static Private Attributes | |
str | __slots__ = 'engine', 'engine_name', 'lock', 'suspended_status', 'logger' |
Base classes used for all types of request processors.
Definition at line 58 of file abstract.py.
searx.search.processors.abstract.EngineProcessor.__init__ | ( | self, | |
engine, | |||
str | engine_name ) |
Definition at line 63 of file abstract.py.
|
protected |
Definition at line 108 of file abstract.py.
References searx.search.processors.abstract.EngineProcessor.engine_name, searx.search.processors.offline.OfflineProcessor.engine_name, and searx.search.processors.online.OnlineProcessor.engine_name.
Referenced by searx.search.processors.abstract.EngineProcessor.extend_container().
searx.search.processors.abstract.EngineProcessor.extend_container | ( | self, | |
result_container, | |||
start_time, | |||
search_results ) |
Definition at line 120 of file abstract.py.
References searx.search.processors.abstract.EngineProcessor._extend_container_basic(), searx.search.processors.abstract.EngineProcessor.handle_exception(), and searx.search.processors.abstract.EngineProcessor.suspended_status.
Referenced by searx.search.processors.offline.OfflineProcessor.search(), and searx.search.processors.online.OnlineProcessor.search().
searx.search.processors.abstract.EngineProcessor.extend_container_if_suspended | ( | self, | |
result_container ) |
Definition at line 130 of file abstract.py.
References searx.search.processors.abstract.EngineProcessor.engine_name, searx.search.processors.offline.OfflineProcessor.engine_name, searx.search.processors.online.OnlineProcessor.engine_name, and searx.search.processors.abstract.EngineProcessor.suspended_status.
searx.search.processors.abstract.EngineProcessor.get_default_tests | ( | self | ) |
Reimplemented in searx.search.processors.online.OnlineProcessor, searx.search.processors.online_currency.OnlineCurrencyProcessor, and searx.search.processors.online_dictionary.OnlineDictionaryProcessor.
Definition at line 193 of file abstract.py.
searx.search.processors.abstract.EngineProcessor.get_params | ( | self, | |
search_query, | |||
engine_category ) |
Returns a set of (see :ref:`request params <engine request arguments>`) or ``None`` if request is not supported. Not supported conditions (``None`` is returned): - A page-number > 1 when engine does not support paging. - A time range when the engine does not support time range.
Reimplemented in searx.search.processors.online.OnlineProcessor, searx.search.processors.online_currency.OnlineCurrencyProcessor, searx.search.processors.online_dictionary.OnlineDictionaryProcessor, and searx.search.processors.online_url_search.OnlineUrlSearchProcessor.
Definition at line 138 of file abstract.py.
References searx.search.processors.abstract.EngineProcessor.engine, searx.search.processors.online.OnlineProcessor.engine, searx.search.processors.online_dictionary.OnlineDictionaryProcessor.engine, searx.search.processors.abstract.EngineProcessor.engine_name, searx.search.processors.offline.OfflineProcessor.engine_name, and searx.search.processors.online.OnlineProcessor.engine_name.
searx.search.processors.abstract.EngineProcessor.get_tests | ( | self | ) |
Definition at line 186 of file abstract.py.
searx.search.processors.abstract.EngineProcessor.handle_exception | ( | self, | |
result_container, | |||
exception_or_message, | |||
suspend = False ) |
Definition at line 85 of file abstract.py.
References searx.search.processors.abstract.EngineProcessor.engine_name, searx.search.processors.offline.OfflineProcessor.engine_name, searx.search.processors.online.OnlineProcessor.engine_name, and searx.search.processors.abstract.EngineProcessor.suspended_status.
Referenced by searx.search.processors.abstract.EngineProcessor.extend_container(), and searx.search.processors.online.OnlineProcessor.search().
searx.search.processors.abstract.EngineProcessor.has_initialize_function | ( | self | ) |
Definition at line 82 of file abstract.py.
References searx.search.processors.abstract.EngineProcessor.engine, searx.search.processors.online.OnlineProcessor.engine, and searx.search.processors.online_dictionary.OnlineDictionaryProcessor.engine.
searx.search.processors.abstract.EngineProcessor.initialize | ( | self | ) |
Reimplemented in searx.search.processors.online.OnlineProcessor.
Definition at line 71 of file abstract.py.
References searx.search.processors.abstract.EngineProcessor.engine, searx.search.processors.online.OnlineProcessor.engine, searx.search.processors.online_dictionary.OnlineDictionaryProcessor.engine, searx.search.processors.abstract.EngineProcessor.engine_name, searx.search.processors.offline.OfflineProcessor.engine_name, searx.search.processors.online.OnlineProcessor.engine_name, and searx.search.processors.abstract.EngineProcessor.logger.
searx.search.processors.abstract.EngineProcessor.search | ( | self, | |
query, | |||
params, | |||
result_container, | |||
start_time, | |||
timeout_limit ) |
Reimplemented in searx.search.processors.offline.OfflineProcessor, and searx.search.processors.online.OnlineProcessor.
Definition at line 183 of file abstract.py.
|
staticprivate |
Definition at line 61 of file abstract.py.
searx.search.processors.abstract.EngineProcessor.engine = engine |
Definition at line 64 of file abstract.py.
Referenced by searx.search.processors.offline.OfflineProcessor._search_basic(), searx.search.processors.online.OnlineProcessor._search_basic(), searx.search.processors.abstract.EngineProcessor.get_params(), searx.search.processors.online.OnlineProcessor.get_params(), searx.search.processors.abstract.EngineProcessor.has_initialize_function(), searx.search.processors.abstract.EngineProcessor.initialize(), and searx.search.processors.online.OnlineProcessor.initialize().
searx.search.processors.abstract.EngineProcessor.engine_name = engine_name |
Definition at line 65 of file abstract.py.
Referenced by searx.search.processors.abstract.EngineProcessor._extend_container_basic(), searx.search.processors.online.OnlineProcessor._send_http_request(), searx.search.processors.abstract.EngineProcessor.extend_container_if_suspended(), searx.search.processors.abstract.EngineProcessor.get_params(), searx.search.processors.abstract.EngineProcessor.handle_exception(), searx.search.processors.abstract.EngineProcessor.initialize(), and searx.search.processors.online.OnlineProcessor.search().
searx.search.processors.abstract.EngineProcessor.logger = engines[engine_name].logger |
Definition at line 66 of file abstract.py.
Referenced by searx.search.processors.online.OnlineProcessor.get_params(), searx.search.processors.abstract.EngineProcessor.initialize(), and searx.search.processors.online.OnlineProcessor.search().
searx.search.processors.abstract.EngineProcessor.suspended_status = SUSPENDED_STATUS.setdefault(key, SuspendedStatus()) |