mirror of
https://github.com/NanmiCoder/MediaCrawler.git
synced 2026-03-22 12:07:32 +08:00
fix: extend make_async_client to proxy provider and IP pool
Migrate remaining httpx.AsyncClient call sites in proxy/ package to use make_async_client(), completing the DISABLE_SSL_VERIFY coverage across all outbound HTTP requests in the project. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,7 @@ from typing import Dict, List
|
||||
|
||||
import httpx
|
||||
from pydantic import BaseModel, Field
|
||||
from tools.httpx_util import make_async_client
|
||||
|
||||
from proxy import IpCache, IpInfoModel, ProxyProvider
|
||||
from proxy.types import ProviderNameEnum
|
||||
@@ -113,7 +114,7 @@ class KuaiDaiLiProxy(ProxyProvider):
|
||||
self.params.update({"num": need_get_count})
|
||||
|
||||
ip_infos: List[IpInfoModel] = []
|
||||
async with httpx.AsyncClient() as client:
|
||||
async with make_async_client() as client:
|
||||
response = await client.get(self.api_base + uri, params=self.params)
|
||||
|
||||
if response.status_code != 200:
|
||||
|
||||
Reference in New Issue
Block a user