mirror of
https://github.com/NanmiCoder/MediaCrawler.git
synced 2026-04-20 02:37:38 +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:
@@ -26,6 +26,7 @@ from typing import Dict, List
|
||||
|
||||
import httpx
|
||||
from tenacity import retry, stop_after_attempt, wait_fixed
|
||||
from tools.httpx_util import make_async_client
|
||||
|
||||
import config
|
||||
from proxy.providers import (
|
||||
@@ -81,7 +82,7 @@ class ProxyIpPool:
|
||||
else:
|
||||
proxy_url = f"http://{proxy.ip}:{proxy.port}"
|
||||
|
||||
async with httpx.AsyncClient(proxy=proxy_url) as client:
|
||||
async with make_async_client(proxy=proxy_url) as client:
|
||||
response = await client.get(self.valid_ip_url)
|
||||
if response.status_code == 200:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user