优化代理相关的
This commit is contained in:
@@ -321,9 +321,15 @@ 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:
|
||||
logger.debug(f"Roundcube: 邮件 UID={msg['uid']} 日期 {msg['date']} 早于发送时间,跳过")
|
||||
continue
|
||||
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
|
||||
|
||||
# 读取邮件正文提取验证码
|
||||
body_html = self._rc_fetch_email_body(msg["uid"])
|
||||
|
||||
+1
-1
@@ -514,7 +514,7 @@ class DouyuLogin:
|
||||
proxy_switches = 0
|
||||
|
||||
# ── 极验验证最大尝试次数(超出后回到 login 整体重试)──
|
||||
_MAX_GEETEST_ATTEMPTS = 15
|
||||
_MAX_GEETEST_ATTEMPTS = 5
|
||||
|
||||
# 连续临时失败计数(同一代理下),超过阈值才换代理
|
||||
_soft_fail_streak = 0
|
||||
|
||||
Reference in New Issue
Block a user