Compare commits
No commits in common. "079d78a83dc1b9dc4a3173b35d284bda5f81a932" and "5bab89a9f0de270b117b5a42be16294c59e4ccda" have entirely different histories.
079d78a83d
...
5bab89a9f0
@ -2,7 +2,6 @@
|
||||
|
||||
from traceback import format_exc
|
||||
import aiohttp
|
||||
from aiohttp import ClientConnectionError
|
||||
import asyncio
|
||||
from aiohttp_socks import ProxyConnector
|
||||
from pathlib import Path
|
||||
@ -96,7 +95,7 @@ class StreamHttpClient:
|
||||
use_socks=False, chunk_size=chunk_size, **kw
|
||||
):
|
||||
yield chunk
|
||||
except ClientConnectionError as e:
|
||||
except Exception as e:
|
||||
debug(f"❌ Direct request failed: {e}, {headers=}, {data=},{params=}")
|
||||
debug("🧦 Retrying with SOCKS5 proxy...")
|
||||
try:
|
||||
@ -111,9 +110,6 @@ class StreamHttpClient:
|
||||
except Exception as e2:
|
||||
exception(f"❌ SOCKS5 request also failed: {e2},{format_exc()}")
|
||||
raise e2
|
||||
except Exception as e:
|
||||
debug(f"❌ request failed: {e}, {headers=}, {data=},{params=}")
|
||||
raise e
|
||||
|
||||
async def _request_with_connector(self, method, url,
|
||||
headers=None, params=None, data=None,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user