refactor: 优化代码

This commit is contained in:
Relakkes
2023-07-29 15:35:40 +08:00
parent febbb133d7
commit 4ff2cf8661
17 changed files with 133 additions and 140 deletions

View File

@@ -1,9 +1,11 @@
from abc import ABC, abstractmethod
from base.proxy_account_pool import AccountPool
class AbstractCrawler(ABC):
@abstractmethod
def init_config(self, **kwargs):
def init_config(self, platform: str, login_type: str, account_pool: AccountPool):
pass
@abstractmethod
@@ -11,7 +13,7 @@ class AbstractCrawler(ABC):
pass
@abstractmethod
async def search_posts(self):
async def search(self):
pass

View File

@@ -1,4 +1,4 @@
from typing import Tuple, Optional, List, Set
from typing import List, Optional, Set, Tuple
import config