Browse Source

Added video conv start string

master
Jim Martens 5 months ago
parent
commit
7b27976724
  1. 2
      CHANGELOG.rst
  2. 2
      README.rst
  3. 2
      setup.py
  4. 4
      src/twomartens/allrisscraper/internal.py

2
CHANGELOG.rst

@ -3,6 +3,8 @@ Changelog
This changelog contains a list of versions with their respective high-level changes.
v0.5.9:
- deal with yet another video conference start string
v0.5.8:
- deal with yet another time format
v0.5.7:

2
README.rst

@ -6,7 +6,7 @@ ALLRIS Scraper
.. image:: https://img.shields.io/pypi/pyversions/twomartens.allrisscraper.svg
:alt: Python 3.7 and 3.8
.. image:: https://img.shields.io/pypi/v/twomartens.allrisscraper.svg
:alt: version 0.5.8
:alt: version 0.5.9
This scraper offers both public and private scraping. The latter requires your username and password and performs the
following tasks for you:

2
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.8",
version="0.5.9",
namespace_packages=["twomartens"],
packages=find_packages('src', exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
package_dir={'': 'src'},

4
src/twomartens/allrisscraper/internal.py

@ -183,10 +183,12 @@ def get_abbreviated_committee_name(name: str, district: str) -> str:
start_video_conf2 = "Nichtöffentliche Videokonferenz "
start_video_conf3 = "Nichtöffentliche Videokonferenz- "
start_video_conf4 = "öffentliche Videokonferenz - "
start_video_conf5 = "Ö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)
start_video_conf5_p = re.compile("Öffentliche Videokonferenz ", re.I)
abbreviated_name = ""
if start_video_conf1_p.match(name):
@ -197,6 +199,8 @@ def get_abbreviated_committee_name(name: str, district: str) -> str:
name = name[len(start_video_conf3):]
if start_video_conf4_p.match(name):
name = name[len(start_video_conf4):]
if start_video_conf5_p.match(name):
name = name[len(start_video_conf5):]
if name.startswith(start_plenary):
abbreviated_name = "BV"
elif name.startswith(start_committee):

Loading…
Cancel
Save