fix: handle YAML null values for list config fields

PyYAML parst auskommentierte Listen als None statt []. Da der Key
vorhanden ist, greift .get(key, []) nicht. Drei Fixes:
- extractor.py, differ.py: `or []` statt Default-Argument
- config.py: _deep_update überspringt None-Override auf List-Defaults

Tritt auf bei `ignore_selectors` und `ignore_patterns` in config.yaml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Your Name 2026-06-12 01:12:09 +02:00
commit de90dbc19c
3 changed files with 4 additions and 2 deletions

View file

@ -47,7 +47,7 @@ def extract_page(html: str, url: str, cfg: dict | None = None) -> dict:
soup = BeautifulSoup(html, "lxml")
# Remove ignored selectors before text extraction
ignore_selectors = cfg.get("normalization", {}).get("ignore_selectors", [])
ignore_selectors = cfg.get("normalization", {}).get("ignore_selectors") or []
for sel in ignore_selectors:
for el in soup.select(sel):
el.decompose()