Detect shib login page as login page

And do not assume we are logged in...
This commit is contained in:
I-Al-Istannen 2022-01-08 20:28:45 +01:00
parent 10d9d74528
commit d30f25ee97

View File

@ -630,7 +630,8 @@ instance's greatest bottleneck.
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
shib_login = soup.find(id="button_shib_login")
return not login_button and not shib_login
# Personal Desktop
if soup.find("a", attrs={"href": lambda x: x and "block_type=pditems" in x}):