把 msg 为空从致命降为跳过,避免一校异常中止整轮

上一轮 362 校只跑到 260 就停:西北工业大学(10699) 的 yjfxs.do 返回 HTTP200
但 msg='' 落进「未知 msg」分支被判 fatal,直接 return 1 中止全局。
这不是 HTTP 403/429 那类必须中止的信号,改成 refused 跳过分片继续,
原因原文留档。该分片未标已完成,续跑可补。
This commit is contained in:
Your Name committed 2026-11-02 16:14:29 +08:00
1 parent 38f51620dd
commit 310ceed141
1 file changed
+4 -1
+4 -1
View File
@@ -157,7 +157,10 @@ class Fetcher:
return False, None, {"refused": True, "fatal": False,
"reason": "限流重试 %d 次仍拒:%s" % (self.max_retry, m),
"http": 200}
return False, None, {"refused": True, "fatal": True,
# msg 是字符串但不含已知拒绝措辞(实测有 msg='' 的校):
# 这只说明该分片拿不到可解析正文,跟 HTTP 403/429 那类必须中止全局的
# 信号不是一回事,标 refused 跳过继续跑,原因原文留档便于回查。
return False, None, {"refused": True, "fatal": False,
"reason": "未知 msg=%r" % m, "http": 200}
return False, None, {"refused": True, "fatal": False, "reason": last or "重试耗尽"}