fix(douyu): 修复斗鱼链路 P0/P1 隐患并增强 P2 运维队列可观测性
This commit is contained in:
@@ -122,9 +122,11 @@ class ProxyResolver:
|
||||
self._log("info", f"代理预检 {attempt}/{max_attempts}: 正在获取代理")
|
||||
|
||||
try:
|
||||
response = requests.get(self.api_url, timeout=10)
|
||||
response.raise_for_status()
|
||||
text = response.text.strip()
|
||||
with requests.Session() as sess:
|
||||
sess.trust_env = False
|
||||
with sess.get(self.api_url, timeout=10) as response:
|
||||
response.raise_for_status()
|
||||
text = response.text.strip()
|
||||
|
||||
proxy_urls, whitelist_ip = parse_proxy_response(text)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user