mirror of
https://github.com/Garmelon/PFERD.git
synced 2025-07-12 06:02:31 +02:00
Load crawlers from config file
This commit is contained in:
@ -8,6 +8,7 @@ from typing import AsyncContextManager, AsyncIterator, Optional
|
||||
from rich.markup import escape
|
||||
|
||||
from .conductor import ProgressBar, TerminalConductor
|
||||
from .config import Config
|
||||
from .limiter import Limiter
|
||||
from .transformer import RuleParseException, Transformer
|
||||
|
||||
@ -17,7 +18,12 @@ class CrawlerLoadException(Exception):
|
||||
|
||||
|
||||
class Crawler(ABC):
|
||||
def __init__(self, name: str, section: configparser.SectionProxy) -> None:
|
||||
def __init__(
|
||||
self,
|
||||
name: str,
|
||||
config: Config,
|
||||
section: configparser.SectionProxy,
|
||||
) -> None:
|
||||
"""
|
||||
Initialize a crawler from its name and its section in the config file.
|
||||
|
||||
|
Reference in New Issue
Block a user