Fixed login procedure and updated changelog/README
This commit is contained in:
@ -53,7 +53,7 @@ def main(_) -> None:
|
||||
driver = webdriver.Firefox(firefox_binary=binary, options=options, executable_path=geckodriver)
|
||||
driver.set_window_size(1920, 1080)
|
||||
driver.delete_all_cookies()
|
||||
driver.implicitly_wait(5)
|
||||
driver.implicitly_wait(10)
|
||||
driver.get(ALLRIS_LOGIN)
|
||||
login(driver, username=username, password=password)
|
||||
driver.get("https://serviceportal.hamburg.de/HamburgGateway/Service/StartService/ALLMAnd")
|
||||
@ -64,11 +64,14 @@ def main(_) -> None:
|
||||
|
||||
|
||||
def login(driver: webdriver.Firefox, username: str, password: str) -> None:
|
||||
collapsible = driver.find_element_by_id("headingLoginWithUsernamePassword")
|
||||
if not collapsible.get_attribute("aria-expanded"):
|
||||
collapsible.click()
|
||||
login_field = driver.find_element_by_id("Username")
|
||||
login_field.send_keys(username)
|
||||
password_field = driver.find_element_by_id("Password")
|
||||
password_field.send_keys(password)
|
||||
button = driver.find_element_by_class_name("btn-primary")
|
||||
button = driver.find_element_by_id("LoginUsingUsernamePassword-Submit")
|
||||
button.click()
|
||||
|
||||
|
||||
@ -175,7 +178,7 @@ def get_abbreviated_committee_name(name: str, district: str) -> str:
|
||||
abbreviated_name = ""
|
||||
|
||||
if name.startswith(start_video_conf):
|
||||
name = name.removeprefix(start_video_conf)
|
||||
name = name[len(start_video_conf):]
|
||||
if name.startswith(start_plenary):
|
||||
abbreviated_name = "BV"
|
||||
elif name.startswith(start_committee):
|
||||
|
||||
Reference in New Issue
Block a user