From 5ae4e0ae93cfa2e76048086c7fa71a5ffeec220e Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Sun, 11 Apr 2021 10:38:40 +0200 Subject: [PATCH] Added missing pattern --- CHANGELOG.rst | 2 ++ setup.py | 2 +- src/twomartens/allrisscraper/internal.py | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c02c706..5830422 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,8 @@ Changelog This changelog contains a list of versions with their respective high-level changes. +v0.5.6: + - added additional pattern v0.5.5: - fixed missing len of pattern v0.5.4: diff --git a/setup.py b/setup.py index e82f30e..47e5b47 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ setup( author="Jim Martens", author_email="github@2martens.de", url="https://git.2martens.de/2martens/allris-scraper", - version="0.5.5", + version="0.5.6", namespace_packages=["twomartens"], packages=find_packages('src', exclude=["*.tests", "*.tests.*", "tests.*", "tests"]), package_dir={'': 'src'}, diff --git a/src/twomartens/allrisscraper/internal.py b/src/twomartens/allrisscraper/internal.py index 3507ae9..5978721 100644 --- a/src/twomartens/allrisscraper/internal.py +++ b/src/twomartens/allrisscraper/internal.py @@ -178,9 +178,11 @@ def get_abbreviated_committee_name(name: str, district: str) -> str: start_video_conf1 = "NICHTÖFFENTLICHE VIDEOKONFERENZ! " start_video_conf2 = "Nichtöffentliche Videokonferenz " start_video_conf3 = "Nichtöffentliche Videokonferenz- " + start_video_conf4 = "öffentliche Videokonferenz - " start_video_conf1_p = re.compile("NICHTÖFFENTLICHE VIDEOKONFERENZ! ", re.I) start_video_conf2_p = re.compile("Nichtöffentliche Videokonferenz ", re.I) start_video_conf3_p = re.compile("Nichtöffentliche Videokonferenz- ", re.I) + start_video_conf4_p = re.compile("öffentliche Videokonferenz - ", re.I) abbreviated_name = "" if start_video_conf1_p.match(name): @@ -189,6 +191,8 @@ def get_abbreviated_committee_name(name: str, district: str) -> str: name = name[len(start_video_conf2):] if start_video_conf3_p.match(name): name = name[len(start_video_conf3):] + if start_video_conf4_p.match(name): + name = name[len(start_video_conf4):] if name.startswith(start_plenary): abbreviated_name = "BV" elif name.startswith(start_committee):