From 521d94061101f4924068023ee5dd52e0655dce47 Mon Sep 17 00:00:00 2001 From: Dotty Dotter Date: Fri, 10 Apr 2026 17:40:46 +0200 Subject: [PATCH] #22 NI: Deduplizierung (Server liefert manche Treffer doppelt) --- app/parlamente.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/parlamente.py b/app/parlamente.py index 4c21646..573a143 100644 --- a/app/parlamente.py +++ b/app/parlamente.py @@ -464,6 +464,7 @@ class PortalaAdapter(ParlamentAdapter): - WEV08[0].1 → PDF-URL (alternativ) """ results: list[Drucksache] = [] + seen: set[str] = set() for m in self._RE_JSON_COMMENT.finditer(html): try: @@ -517,6 +518,11 @@ class PortalaAdapter(ParlamentAdapter): typ=typ or "Antrag", ) + # Deduplizierung (NI liefert manche Treffer doppelt) + if drucksache in seen: + continue + seen.add(drucksache) + # Client-seitig Antrag-Filter (wie bei allen Adaptern) if "antrag" not in (doc.typ or "").lower(): continue