MediaCrawler/base/base_crawler.py

36 lines
659 B
Python
Raw Normal View History

from abc import ABC, abstractmethod
2023-07-29 07:35:40 +00:00
from base.proxy_account_pool import AccountPool
class AbstractCrawler(ABC):
@abstractmethod
2023-07-29 07:35:40 +00:00
def init_config(self, platform: str, login_type: str, account_pool: AccountPool):
pass
@abstractmethod
async def start(self):
pass
@abstractmethod
2023-07-29 07:35:40 +00:00
async def search(self):
pass
class AbstractLogin(ABC):
@abstractmethod
async def begin(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