Properly load crawler config

This commit is contained in:
Joscha
2021-05-05 23:45:10 +02:00
parent 5497dd2827
commit 273d56c39a
3 changed files with 80 additions and 19 deletions

View File

@ -1,5 +1,10 @@
from configparser import SectionProxy
from typing import Callable, Dict
from ..config import Config
from ..crawler import Crawler, CrawlerSection
from .dummy import DummyCrawler
CRAWLERS = {
"dummy": DummyCrawler,
CRAWLERS: Dict[str, Callable[[str, Config, SectionProxy], Crawler]] = {
"dummy": lambda n, c, s: DummyCrawler(n, c, CrawlerSection(s)),
}