From 3f094242df0a80275371d05d19409e168b81798c Mon Sep 17 00:00:00 2001 From: hermes Date: Thu, 27 Aug 2026 03:44:46 +0000 Subject: [PATCH] =?UTF-8?q?v10.6=E6=94=B6=E7=B4=A7:=20=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E9=98=BB=E7=A2=8D=E7=A2=B0=E5=88=B0=E5=8D=B3=E7=BB=88=E6=80=81?= =?UTF-8?q?=E5=81=9C=E6=AD=A2(=E5=BD=93=E6=97=A5=E4=B8=8D=E6=81=A2?= =?UTF-8?q?=E5=A4=8D=E4=B8=8D=E8=B7=B3=E8=BF=87);=20stop-tasks.sh=20start?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BD=93=E6=97=A5platform=5Fblocked=E6=8B=92?= =?UTF-8?q?=E7=BB=9D=E5=90=AF=E5=8A=A8=E4=BF=9D=E6=8A=A4(=E8=AF=AF?= =?UTF-8?q?=E5=88=A4=E5=8F=AF=E5=88=A0=E7=8A=B6=E6=80=81=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=A7=A3=E9=99=A4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/daily-runner.js | 17 +++++++---------- scripts/stop-tasks.sh | 13 +++++++++++++ 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/scripts/daily-runner.js b/scripts/daily-runner.js index a0c668d..05b17c7 100644 --- a/scripts/daily-runner.js +++ b/scripts/daily-runner.js @@ -290,17 +290,14 @@ async function verifyBlockedPage() { maybeSendReport('login_expired', lastChatLeft); needRelogin = true; } - // 阻碍即停(v10.6 通用):弹窗无有效简历(限额/提示页等)→ 二次核查确认 → 私聊告警,停止 - // 注意:与风控/验证码分开处理——这种是平台功能限制(如日浏览1000份上限),不是风控 + // 阻碍即停(v10.6 通用,2026-08-27 收紧:碰到即终态停止,当日不再恢复): + // 弹窗无有效简历(日浏览限额/提示页等)→ 私聊告警(附弹窗原文)→ 立即停止 + // 二次核查仅用于给告警补充确认信息,不影响"停止"这个结果 else if (/弹窗无有效简历数据/.test(out)) { - log('弹窗无有效数据,二次核查中...'); - const confirmed = await verifyBlockedPage(); - if (confirmed) { - send(DM, `🚨 ${ACCT} 碰到平台阻碍(${confirmed}),已核查确认,任务停止。请人工查看任务机浏览器确认后再启动\n日志: ${out.match(/弹窗内容: [^\n]*/)?.[0] || ''}`); - maybeSendReport('platform_blocked', lastChatLeft); - break; - } - log('核查未复现(可能是瞬时异常页),跳过继续下一批'); + const detail = await verifyBlockedPage(); + send(DM, `🚨 ${ACCT} 碰到平台阻碍${detail ? `(${detail})` : ''},任务已停止,当日不再重新启动。请人工查看任务机浏览器确认\n日志: ${out.match(/弹窗内容: [^\n]*/)?.[0] || ''}`); + maybeSendReport('platform_blocked', lastChatLeft); + break; } // 风控/验证码 → 私聊告警,结束(不监听,风控需人工评估) else if (/ALERT.*(风控|验证|频繁|受限)/.test(out)) { diff --git a/scripts/stop-tasks.sh b/scripts/stop-tasks.sh index 45cdbb5..a3a9a9c 100755 --- a/scripts/stop-tasks.sh +++ b/scripts/stop-tasks.sh @@ -77,6 +77,19 @@ do_stop() { do_start() { # $1=acct local acct="$1" port label [ "$acct" = "hr1" ] && { port=9223; label=Chrome; } || { port=9225; label=Edge; } + # v10.6 当日平台阻碍保护:已 platform_blocked 的账号当日拒绝启动(限额等不会当日恢复) + local st + st=$(python3 -c " +import json,datetime +try: + s=json.load(open('$STATE_DIR/state-$acct.json')) + bj=datetime.datetime.utcnow()+datetime.timedelta(hours=8) + print(s.get('status','') if s.get('date')==bj.strftime('%Y-%m-%d') else '') +except Exception: print('')" 2>/dev/null) + if [ "$st" = "platform_blocked" ]; then + echo "⛔ $acct 今日已碰到平台阻碍(限额类),按规则当日不再启动。如确认误判,删除 $STATE_DIR/state-$acct.json 后重试" + return 1 + fi # 启动前防重 local existing; existing=$(find_pids "$acct") if [ -n "$existing" ]; then