#22 NI: Deduplizierung (Server liefert manche Treffer doppelt)
This commit is contained in:
parent
edcb4e9c76
commit
521d940611
@ -464,6 +464,7 @@ class PortalaAdapter(ParlamentAdapter):
|
|||||||
- WEV08[0].1 → PDF-URL (alternativ)
|
- WEV08[0].1 → PDF-URL (alternativ)
|
||||||
"""
|
"""
|
||||||
results: list[Drucksache] = []
|
results: list[Drucksache] = []
|
||||||
|
seen: set[str] = set()
|
||||||
|
|
||||||
for m in self._RE_JSON_COMMENT.finditer(html):
|
for m in self._RE_JSON_COMMENT.finditer(html):
|
||||||
try:
|
try:
|
||||||
@ -517,6 +518,11 @@ class PortalaAdapter(ParlamentAdapter):
|
|||||||
typ=typ or "Antrag",
|
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)
|
# Client-seitig Antrag-Filter (wie bei allen Adaptern)
|
||||||
if "antrag" not in (doc.typ or "").lower():
|
if "antrag" not in (doc.typ or "").lower():
|
||||||
continue
|
continue
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user