xhs_crawler/base/base_crawler.py
Relakkes 700946b28a feat: 小红书增加指定帖子爬取功能
fix: 修复程序一些异常 bug
refactor: 优化部分代码逻辑
2023-11-18 13:38:11 +08:00

36 lines
678 B
Python

from abc import ABC, abstractmethod
from base.proxy_account_pool import AccountPool
class AbstractCrawler(ABC):
@abstractmethod
def init_config(self, platform: str, login_type: str, account_pool: AccountPool, crawler_type: str):
pass
@abstractmethod
async def start(self):
pass
@abstractmethod
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