Rename the ilias crawler to ilias web crawler

This commit is contained in:
I-Al-Istannen 2021-05-19 21:41:17 +02:00
parent 2976b4d352
commit 81301f3a76
3 changed files with 8 additions and 8 deletions

View File

@ -4,7 +4,7 @@ from typing import Callable, Dict
from ..authenticator import Authenticator
from ..config import Config
from ..crawler import Crawler
from .ilias import KitIliasCrawler, KitIliasCrawlerSection
from .ilias import KitIliasWebCrawler, KitIliasWebCrawlerSection
from .local import LocalCrawler, LocalCrawlerSection
CrawlerConstructor = Callable[[
@ -17,6 +17,6 @@ CrawlerConstructor = Callable[[
CRAWLERS: Dict[str, CrawlerConstructor] = {
"local": lambda n, s, c, a:
LocalCrawler(n, LocalCrawlerSection(s), c),
"kit-ilias": lambda n, s, c, a:
KitIliasCrawler(n, KitIliasCrawlerSection(s), c, a),
"kit-ilias-web": lambda n, s, c, a:
KitIliasWebCrawler(n, KitIliasWebCrawlerSection(s), c, a),
}

View File

@ -1,3 +1,3 @@
from .kit_web_ilias_crawler import KitIliasCrawler, KitIliasCrawlerSection
from .kit_ilias_web_crawler import KitIliasWebCrawler, KitIliasWebCrawlerSection
__all__ = ["KitIliasCrawler", "KitIliasCrawlerSection"]
__all__ = ["KitIliasWebCrawler", "KitIliasWebCrawlerSection"]

View File

@ -19,7 +19,7 @@ from .kit_ilias_html import IliasElementType, IliasPage, IliasPageElement
TargetType = Union[str, int]
class KitIliasCrawlerSection(CrawlerSection):
class KitIliasWebCrawlerSection(CrawlerSection):
def target(self) -> TargetType:
target = self.s.get("target")
@ -64,11 +64,11 @@ _DIRECTORY_PAGES: Set[IliasElementType] = set([
])
class KitIliasCrawler(HttpCrawler):
class KitIliasWebCrawler(HttpCrawler):
def __init__(
self,
name: str,
section: KitIliasCrawlerSection,
section: KitIliasWebCrawlerSection,
config: Config,
authenticators: Dict[str, Authenticator]
):