16 lines
401 B
Python
16 lines
401 B
Python
from abc import ABC, abstractmethod
|
|
from hc_spider.model import SharedObjects, Response, ResponseError
|
|
|
|
|
|
class SpiderAbs(ABC):
|
|
_shared_objects: SharedObjects
|
|
|
|
def __init__(self, shared_objects: SharedObjects) -> None:
|
|
self._shared_objects = shared_objects
|
|
|
|
|
|
class ISpider(SpiderAbs, ABC):
|
|
@abstractmethod
|
|
def get_links(self, url: str) -> Response | ResponseError:
|
|
pass
|