From f84b46f6c91e1b4305c1dbcc6aee12353a2d2a8d Mon Sep 17 00:00:00 2001 From: youkang <1062424570@qq.com> Date: Mon, 19 May 2025 14:33:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BC=82=E5=B8=B8=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zhenxun/utils/http_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zhenxun/utils/http_utils.py b/zhenxun/utils/http_utils.py index 8d19d132..e5f2492f 100644 --- a/zhenxun/utils/http_utils.py +++ b/zhenxun/utils/http_utils.py @@ -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