pferd/PFERD/crawlers/__init__.py

13 lines
448 B
Python
Raw Normal View History

2021-05-05 23:45:10 +02:00
from configparser import SectionProxy
from typing import Callable, Dict
from ..config import Config
from ..crawler import Crawler, CrawlerSection
2021-04-29 13:44:29 +02:00
from .dummy import DummyCrawler
2021-05-06 01:02:40 +02:00
from .local import LocalCrawler, LocalCrawlerSection
2021-04-29 13:44:29 +02:00
2021-05-05 23:45:10 +02:00
CRAWLERS: Dict[str, Callable[[str, Config, SectionProxy], Crawler]] = {
"dummy": lambda n, c, s: DummyCrawler(n, c, CrawlerSection(s)),
2021-05-06 01:02:40 +02:00
"local": lambda n, c, s: LocalCrawler(n, c, LocalCrawlerSection(s)),
2021-04-29 13:44:29 +02:00
}