mirror of
https://github.com/NanmiCoder/MediaCrawler.git
synced 2026-03-21 11:37:33 +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:
@@ -30,6 +30,7 @@ import httpx
|
||||
from proxy import IpCache, IpGetError, ProxyProvider
|
||||
from proxy.types import IpInfoModel
|
||||
from tools import utils
|
||||
from tools.httpx_util import make_async_client
|
||||
|
||||
|
||||
class WanDouHttpProxy(ProxyProvider):
|
||||
@@ -65,7 +66,7 @@ class WanDouHttpProxy(ProxyProvider):
|
||||
need_get_count = num - len(ip_cache_list)
|
||||
self.params.update({"num": min(need_get_count, 100)}) # Maximum 100
|
||||
ip_infos = []
|
||||
async with httpx.AsyncClient() as client:
|
||||
async with make_async_client() as client:
|
||||
url = self.api_path + "?" + urlencode(self.params)
|
||||
utils.logger.info(f"[WanDouHttpProxy.get_proxy] get ip proxy url:{url}")
|
||||
response = await client.get(
|
||||
|
||||
Reference in New Issue
Block a user