mirror of
https://github.com/NanmiCoder/MediaCrawler.git
synced 2026-03-04 05:00:47 +08:00
refactor: 优化代码
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Tuple, Optional, List, Set
|
||||
from typing import List, Optional, Set, Tuple
|
||||
|
||||
import config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user