mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
[mod] addition of various type hints / engine processors
Continuation of #5147 .. typification of the engine processors. BTW: - removed obsolete engine property https_support - fixed & improved currency_convert - engine instances can now implement a engine.setup method [#5147] https://github.com/searxng/searxng/pull/5147 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
committed by
Markus Heiser
parent
23257bddce
commit
8f8343dc0d
@@ -48,6 +48,7 @@ import searx.query
|
||||
import searx.search
|
||||
import searx.search.models
|
||||
import searx.webadapter
|
||||
from searx.search.processors import PROCESSORS
|
||||
|
||||
EngineCategoriesVar = Optional[List[str]]
|
||||
|
||||
@@ -172,7 +173,7 @@ if __name__ == '__main__':
|
||||
searx.search.initialize_network(settings_engines, searx.settings['outgoing'])
|
||||
searx.search.check_network_configuration()
|
||||
searx.search.initialize_metrics([engine['name'] for engine in settings_engines])
|
||||
searx.search.initialize_processors(settings_engines)
|
||||
PROCESSORS.init(settings_engines)
|
||||
search_q = get_search_query(prog_args, engine_categories=engine_cs)
|
||||
res_dict = to_dict(search_q)
|
||||
sys.stdout.write(dumps(res_dict, sort_keys=True, indent=4, ensure_ascii=False, default=json_serial))
|
||||
|
||||
Reference in New Issue
Block a user