From 2dd4f7b9721b201dc51cb2fb06d32cb1cb833458 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sat, 24 May 2025 17:53:57 +0200 Subject: [mod] data: implement a simple tracker URL (SQL) database On demand, the tracker data is loaded directly into the cache, so that the maintenance of this data via PRs is no longer necessary. Signed-off-by: Markus Heiser --- searx/data/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'searx/data/__init__.py') diff --git a/searx/data/__init__.py b/searx/data/__init__.py index 5a859f8cd..d43879910 100644 --- a/searx/data/__init__.py +++ b/searx/data/__init__.py @@ -13,6 +13,7 @@ import typing from .core import log, data_dir from .currencies import CurrenciesDB +from .tracker_patterns import TrackerPatternsDB CURRENCIES: CurrenciesDB USER_AGENTS: dict[str, typing.Any] @@ -23,7 +24,7 @@ OSM_KEYS_TAGS: dict[str, typing.Any] ENGINE_DESCRIPTIONS: dict[str, typing.Any] ENGINE_TRAITS: dict[str, typing.Any] LOCALES: dict[str, typing.Any] -TRACKER_PATTERNS: list[dict[str, typing.Any]] +TRACKER_PATTERNS: TrackerPatternsDB lazy_globals = { "CURRENCIES": CurrenciesDB(), @@ -35,7 +36,7 @@ lazy_globals = { "ENGINE_DESCRIPTIONS": None, "ENGINE_TRAITS": None, "LOCALES": None, - "TRACKER_PATTERNS": None, + "TRACKER_PATTERNS": TrackerPatternsDB(), } data_json_files = { @@ -47,7 +48,6 @@ data_json_files = { "ENGINE_DESCRIPTIONS": "engine_descriptions.json", "ENGINE_TRAITS": "engine_traits.json", "LOCALES": "locales.json", - "TRACKER_PATTERNS": "tracker_patterns.json", } -- cgit v1.2.3