mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
优化异常代码行
This commit is contained in:
parent
f1e2e2f243
commit
f84b46f6c9
@ -86,7 +86,8 @@ class AsyncHttpx:
|
||||
logger.info(f"开始获取 {url}..")
|
||||
response = await cls._get_single(url, **kwargs)
|
||||
if check_status_code and response.status_code != check_status_code:
|
||||
raise Exception(f"Status code error: {response.status_code} != {check_status_code}")
|
||||
status_code = response.status_code
|
||||
raise Exception(f"状态码错误:{status_code}!={check_status_code}")
|
||||
return response
|
||||
except Exception as e:
|
||||
last_exception = e
|
||||
|
||||
Loading…
Reference in New Issue
Block a user