mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
Compare commits
1 Commits
3a03810bcb
...
54d8bbeb53
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54d8bbeb53 |
@ -1 +1 @@
|
|||||||
__version__: v0.2.4-d528711
|
__version__: v0.2.4-1cc18bb
|
||||||
|
|||||||
@ -263,18 +263,6 @@ class AsyncHttpx:
|
|||||||
)
|
)
|
||||||
return result
|
return result
|
||||||
except Exception as e:
|
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)
|
exceptions.append(e)
|
||||||
if url != url_list[-1]:
|
if url != url_list[-1]:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user