mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Fix is_logged_in for ILIAS 7
This commit is contained in:
parent
a82a0b19c2
commit
eac2e34161
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user