"""
This type stub file was generated by pyright.
"""
from abc import ABC, abstractmethod
from typing import Dict, Type, Union
logger = ...
class BaseCrawler(ABC):
def __init__(self) -> None:
...
@abstractmethod
async def run(self, url: str = ..., **kwargs) -> str:
"""
Implement this method to return JSON string.
Must accept URL + arbitrary kwargs for flexibility.
"""
...
def __init_subclass__(cls, **kwargs): # -> None:
"""Enforce interface validation on subclassing"""
...
class CrawlerHub:
_crawlers: Dict[str, Type[BaseCrawler]] = ...
@classmethod
def get(cls, name: str) -> Union[Type[BaseCrawler], None]:
...