mirror of
https://github.com/NanmiCoder/MediaCrawler.git
synced 2025-11-25 03:15:17 +08:00
38 lines
640 B
Python
38 lines
640 B
Python
from abc import ABC, abstractmethod
|
|
|
|
|
|
class AbstractCrawler(ABC):
|
|
@abstractmethod
|
|
def init_config(self, **kwargs):
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def start(self):
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def search_posts(self):
|
|
pass
|
|
|
|
|
|
class AbstractLogin(ABC):
|
|
@abstractmethod
|
|
async def begin(self):
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def check_login_state(self):
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def login_by_qrcode(self):
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def login_by_mobile(self):
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def login_by_cookies(self):
|
|
pass
|