mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Rename the ilias crawler to ilias web crawler
This commit is contained in:
parent
2976b4d352
commit
81301f3a76
@ -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),
|
||||
}
|
||||
|
@ -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"]
|
||||
|
@ -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]
|
||||
):
|
Loading…
Reference in New Issue
Block a user