This commit is contained in:
Relakkes 2024-04-13 20:18:04 +08:00
parent c26270146f
commit 87eb8aa6a7
5 changed files with 9 additions and 9 deletions

View File

@ -63,7 +63,7 @@ class AbstractStoreImage(ABC):
async def store_image(self, image_content_item: Dict):
pass
class AbstactApiClient(ABC):
class AbstractApiClient(ABC):
@abstractmethod
async def request(self, method, url, **kwargs):
pass

View File

@ -10,7 +10,7 @@ from urllib.parse import urlencode
import httpx
from playwright.async_api import BrowserContext, Page
from base.base_crawler import AbstactApiClient
from base.base_crawler import AbstractApiClient
from tools import utils
from .exception import DataFetchError
@ -18,7 +18,7 @@ from .field import CommentOrderType, SearchOrderType
from .help import BilibiliSign
class BilibiliClient(AbstactApiClient):
class BilibiliClient(AbstractApiClient):
def __init__(
self,
timeout=10,

View File

@ -7,7 +7,7 @@ import execjs
import httpx
from playwright.async_api import BrowserContext, Page
from base.base_crawler import AbstactApiClient
from base.base_crawler import AbstractApiClient
from tools import utils
from var import request_keyword_var
@ -15,7 +15,7 @@ from .exception import *
from .field import *
class DOUYINClient(AbstactApiClient):
class DOUYINClient(AbstractApiClient):
def __init__(
self,
timeout=30,

View File

@ -8,14 +8,14 @@ import httpx
from playwright.async_api import BrowserContext, Page
import config
from base.base_crawler import AbstactApiClient
from base.base_crawler import AbstractApiClient
from tools import utils
from .exception import DataFetchError
from .graphql import KuaiShouGraphQL
class KuaiShouClient(AbstactApiClient):
class KuaiShouClient(AbstractApiClient):
def __init__(
self,
timeout=10,

View File

@ -8,7 +8,7 @@ import httpx
from playwright.async_api import BrowserContext, Page
import config
from base.base_crawler import AbstactApiClient
from base.base_crawler import AbstractApiClient
from tools import utils
from .exception import DataFetchError, IPBlockError
@ -16,7 +16,7 @@ from .field import SearchNoteType, SearchSortType
from .help import get_search_id, sign
class XiaoHongShuClient(AbstactApiClient):
class XiaoHongShuClient(AbstractApiClient):
def __init__(
self,
timeout=10,