Add SearXNG news collector merged into the briefing pipeline

Optional meta-search source (SEARXNG_BASE_URL): per-query isolation,
time_range=day, merged and deduplicated with the RSS feeds. Briefings
still publish on RSS alone if the instance is down.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jsahn
2026-09-01 00:58:35 +09:00
co-authored by Claude Fable 5
parent 8bc43b3ce4
commit 920d9358a0
7 changed files with 383 additions and 14 deletions
+8 -1
View File
@@ -38,6 +38,13 @@ class Settings(BaseSettings):
# --- Optional data keys ---
fred_api_key: str | None = Field(default=None, alias="FRED_API_KEY")
# --- SearXNG (optional news search; instance must enable the json output format) ---
searxng_base_url: str | None = Field(default=None, alias="SEARXNG_BASE_URL")
# Empty -> collector defaults (us2kr.collectors.searx.DEFAULT_QUERIES).
searxng_queries: Annotated[list[str], NoDecode] = Field(
default_factory=list, alias="US2KR_SEARXNG_QUERIES"
)
# --- Paths ---
data_dir: Path = Field(default=Path("data"), alias="US2KR_DATA_DIR")
reports_dir: Path = Field(default=Path("reports"), alias="US2KR_REPORTS_DIR")
@@ -60,7 +67,7 @@ class Settings(BaseSettings):
log_level: str = Field(default="INFO", alias="US2KR_LOG_LEVEL")
@field_validator("minimax_fallback_models", "krx_extra_holidays", mode="before")
@field_validator("minimax_fallback_models", "krx_extra_holidays", "searxng_queries", mode="before")
@classmethod
def _split_csv(cls, v):
if isinstance(v, str):