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:
parent
98e8d11eb5
commit
de90dbc19c
3 changed files with 4 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue