diff --git a/media_platform/weibo/client.py b/media_platform/weibo/client.py index 21650e4..89b3ee1 100644 --- a/media_platform/weibo/client.py +++ b/media_platform/weibo/client.py @@ -12,6 +12,7 @@ from urllib.parse import urlencode import httpx from playwright.async_api import BrowserContext, Page + from tools import utils from .exception import DataFetchError diff --git a/media_platform/weibo/core.py b/media_platform/weibo/core.py index 1f12ec7..50b6b6c 100644 --- a/media_platform/weibo/core.py +++ b/media_platform/weibo/core.py @@ -10,10 +10,11 @@ import random from asyncio import Task from typing import Dict, List, Optional, Tuple -import config -from base.base_crawler import AbstractCrawler from playwright.async_api import (BrowserContext, BrowserType, Page, async_playwright) + +import config +from base.base_crawler import AbstractCrawler from proxy.proxy_ip_pool import IpInfoModel, create_ip_pool from store import weibo as weibo_store from tools import utils diff --git a/media_platform/weibo/login.py b/media_platform/weibo/login.py index c2e99af..dd0d737 100644 --- a/media_platform/weibo/login.py +++ b/media_platform/weibo/login.py @@ -8,10 +8,11 @@ import functools import sys from typing import Optional -from base.base_crawler import AbstractLogin from playwright.async_api import BrowserContext, Page from tenacity import (RetryError, retry, retry_if_result, stop_after_attempt, wait_fixed) + +from base.base_crawler import AbstractLogin from tools import utils diff --git a/store/weibo/weibo_store_image.py b/store/weibo/weibo_store_image.py index 6b89fe0..e870ad0 100644 --- a/store/weibo/weibo_store_image.py +++ b/store/weibo/weibo_store_image.py @@ -6,6 +6,7 @@ import pathlib from typing import Dict import aiofiles + from base.base_crawler import AbstractStoreImage from tools import utils diff --git a/store/weibo/weibo_store_impl.py b/store/weibo/weibo_store_impl.py index 673cc2a..e2df846 100644 --- a/store/weibo/weibo_store_impl.py +++ b/store/weibo/weibo_store_impl.py @@ -10,6 +10,7 @@ import pathlib from typing import Dict import aiofiles + from base.base_crawler import AbstractStore from tools import utils from var import crawler_type_var