Files
pferd/PFERD/crawl/ilias/kit_ilias_web_crawler.py
I-Al-Istannen 6e563134b2 Fix ruff errors
2025-10-19 15:48:16 +02:00

38 lines
942 B
Python

from typing import Literal
from ...auth import Authenticator
from ...config import Config
from .ilias_web_crawler import IliasWebCrawler, IliasWebCrawlerSection
from .shibboleth_login import ShibbolethLogin
_ILIAS_URL = "https://ilias.studium.kit.edu"
class KitShibbolethBackgroundLoginSuccessful:
pass
class KitIliasWebCrawlerSection(IliasWebCrawlerSection):
def base_url(self) -> str:
return _ILIAS_URL
def login(self) -> Literal["shibboleth"]:
return "shibboleth"
class KitIliasWebCrawler(IliasWebCrawler):
def __init__(
self,
name: str,
section: KitIliasWebCrawlerSection,
config: Config,
authenticators: dict[str, Authenticator],
):
super().__init__(name, section, config, authenticators)
self._shibboleth_login = ShibbolethLogin(
_ILIAS_URL,
self._auth,
section.tfa_auth(authenticators),
)