优化代理相关的

This commit is contained in:
yml2213
2026-06-24 14:44:09 +08:00
parent 83345dfdc5
commit ca5bf3531d
3 changed files with 11 additions and 4 deletions
+1
View File
@@ -24,3 +24,4 @@ slice.jpg
web/frontend/node_modules/
web/frontend/dist/
data/web.db
.DS_Store
+7 -1
View File
@@ -321,7 +321,13 @@ class EmailVerifier:
# 检查时间
if after_timestamp and msg.get("date"):
msg_dt = self._parse_rc_date(msg["date"])
if msg_dt and msg_dt.timestamp() < after_timestamp - allow_old_seconds:
if msg_dt:
# Roundcube 日期只有分钟精度(如"今天 14:20"→14:20:00),
# 而 after_timestamp 是秒级精度(如14:20:49)。
# 直接比较会把同一分钟内的邮件误判为"早于发送时间"跳过。
# 解决:将 after_timestamp 也向下取整到分钟后再比较。
after_minute_ts = after_timestamp - (after_timestamp % 60)
if msg_dt.timestamp() < after_minute_ts - allow_old_seconds:
logger.debug(f"Roundcube: 邮件 UID={msg['uid']} 日期 {msg['date']} 早于发送时间,跳过")
continue
+1 -1
View File
@@ -514,7 +514,7 @@ class DouyuLogin:
proxy_switches = 0
# ── 极验验证最大尝试次数(超出后回到 login 整体重试)──
_MAX_GEETEST_ATTEMPTS = 15
_MAX_GEETEST_ATTEMPTS = 5
# 连续临时失败计数(同一代理下),超过阈值才换代理
_soft_fail_streak = 0