Fix is_logged_in for ILIAS 7

This commit is contained in:
I-Al-Istannen 2022-01-07 23:32:31 +01:00
parent a82a0b19c2
commit eac2e34161

View File

@ -611,9 +611,10 @@ instance's greatest bottleneck.
@staticmethod
def _is_logged_in(soup: BeautifulSoup) -> bool:
# Normal ILIAS pages
userlog = soup.find("li", {"id": "userlog"})
if userlog is not None:
return True
mainbar: Optional[Tag] = soup.find(class_="il-maincontrols-metabar")
if mainbar is not None:
login_button = mainbar.find("button", attrs={"data-action": lambda x: x and "login.php" in x})
return not login_button
# Video listing embeds do not have complete ILIAS html. Try to match them by
# their video listing table
video_table = soup.find(