Browse Source

Fixed missing len of pattern

master
Jim Martens 2 months ago
parent
commit
0cdf7f09d0
3 changed files with 12 additions and 7 deletions
  1. +2
    -0
      CHANGELOG.rst
  2. +1
    -1
      setup.py
  3. +9
    -6
      src/twomartens/allrisscraper/internal.py

+ 2
- 0
CHANGELOG.rst View File

@ -3,6 +3,8 @@ Changelog
This changelog contains a list of versions with their respective high-level changes.
v0.5.5:
- fixed missing len of pattern
v0.5.4:
- match video conference starts case insensitive
v0.5.3:


+ 1
- 1
setup.py View File

@ -30,7 +30,7 @@ setup(
author="Jim Martens",
author_email="github@2martens.de",
url="https://git.2martens.de/2martens/allris-scraper",
version="0.5.4",
version="0.5.5",
namespace_packages=["twomartens"],
packages=find_packages('src', exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
package_dir={'': 'src'},


+ 9
- 6
src/twomartens/allrisscraper/internal.py View File

@ -175,16 +175,19 @@ def get_abbreviated_committee_name(name: str, district: str) -> str:
start_youth_help_committee = "Sitzung des Jugendhilfeausschusses"
start_other_committee = "Sitzung des"
end_other_committee = "ausschusses"
start_video_conf1 = re.compile("NICHTÖFFENTLICHE VIDEOKONFERENZ! ", re.I)
start_video_conf2 = re.compile("Nichtöffentliche Videokonferenz ", re.I)
start_video_conf3 = re.compile("Nichtöffentliche Videokonferenz- ", re.I)
start_video_conf1 = "NICHTÖFFENTLICHE VIDEOKONFERENZ! "
start_video_conf2 = "Nichtöffentliche Videokonferenz "
start_video_conf3 = "Nichtö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)
abbreviated_name = ""
if start_video_conf1.match(name):
if start_video_conf1_p.match(name):
name = name[len(start_video_conf1):]
if start_video_conf2.match(name):
if start_video_conf2_p.match(name):
name = name[len(start_video_conf2):]
if start_video_conf3.match(name):
if start_video_conf3_p.match(name):
name = name[len(start_video_conf3):]
if name.startswith(start_plenary):
abbreviated_name = "BV"


Loading…
Cancel
Save