mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-11-06 12:50:07 +08:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
886c4e5327 | ||
|
|
54d8bbeb53 |
+1
-1
@@ -1 +1 @@
|
||||
__version__: v0.2.4-d528711
|
||||
__version__: v0.2.4-1cc18bb
|
||||
|
||||
@@ -263,18 +263,6 @@ class AsyncHttpx:
|
||||
)
|
||||
return result
|
||||
except Exception as e:
|
||||
if isinstance(e, HTTPStatusError):
|
||||
status = getattr(e.response, "status_code", "?")
|
||||
try:
|
||||
body_text = getattr(e.response, "text", None)
|
||||
if body_text is not None and len(body_text) > 2000:
|
||||
body_text = body_text[:2000] + "...(truncated)"
|
||||
except Exception:
|
||||
body_text = "<unavailable>"
|
||||
logger.debug(
|
||||
f"请求失败: {url} {status} {body_text}",
|
||||
"AsyncHttpx:FallbackExecutor",
|
||||
)
|
||||
exceptions.append(e)
|
||||
if url != url_list[-1]:
|
||||
logger.warning(
|
||||
|
||||
Reference in New Issue
Block a user