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:
+8
-1
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user