From 78f0ba8ab7703fbd28a650fe48e4c2a635c8321a Mon Sep 17 00:00:00 2001 From: hermes Date: Fri, 28 Aug 2026 06:45:22 +0000 Subject: [PATCH] =?UTF-8?q?v10.8=20=E4=BF=AE=E5=A4=8D=E8=AF=AF=E5=88=A4:?= =?UTF-8?q?=20=E5=80=99=E9=80=89=E4=BA=BA=E7=BA=A7=E6=8F=90=E7=A4=BA(?= =?UTF-8?q?=E5=B7=B2=E5=85=B3=E9=97=AD=E6=B1=82=E8=81=8C/=E5=B7=B2?= =?UTF-8?q?=E5=88=A0=E9=99=A4/=E5=B7=B2=E6=89=BE=E5=88=B0=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E7=AD=89=E7=9F=AD=E6=96=87=E6=A1=88)=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E8=B7=B3=E8=BF=87=E8=AF=A5=E4=BA=BA=E7=BB=A7=E7=BB=AD?= =?UTF-8?q?,=20=E4=B8=8D=E5=86=8D=E8=A7=A6=E5=8F=91=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E9=98=BB=E7=A2=8D=E7=BB=88=E6=80=81=E5=81=9C=E6=AD=A2=E2=80=94?= =?UTF-8?q?=E2=80=94=E4=BB=8A=E6=97=A5hr2=E5=9B=A0'=E5=AF=B9=E6=96=B9?= =?UTF-8?q?=E5=B7=B2=E5=85=B3=E9=97=AD=E6=B1=82=E8=81=8C'=E8=A2=AB?= =?UTF-8?q?=E8=AF=AF=E5=81=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/zhaopin-scrape.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/zhaopin-scrape.js b/scripts/zhaopin-scrape.js index 4753158..72eca1e 100755 --- a/scripts/zhaopin-scrape.js +++ b/scripts/zhaopin-scrape.js @@ -260,9 +260,14 @@ async function extractModalData(page) { const hasName = !!(nameMatch && nameMatch[1] && nameMatch[1].trim() && !/提示|通知|警告|限额|上限/.test(nameMatch[1])); const hasStructure = !!(ageMatch || eduMatch || expMatch || eduSection || section('工作经历', '教育经历|个人优势|专业技能|语言能力|证书|打电话|打招呼')); - const modalBlocked = !hasName || !hasStructure; + // v10.8:候选人级提示 ≠ 平台阻碍。"对方已关闭求职/简历已删除/对方已找到工作"等 + // 是单个候选人的状态提示,应跳过该人继续;只有限额/系统级文案才是平台阻碍 + const body = text; + const candidateLevelNotice = /已关闭求职|无法继续进行沟通|已删除|简历不存在|已找到工作|职位已关闭/.test(body) && body.length < 200; + const modalBlocked = (!hasName || !hasStructure) && !candidateLevelNotice; return { modalBlocked, + candidateLevelNotice, staffLogCount, name: nameMatch ? nameMatch[1].trim() : '', age: ageMatch ? parseInt(ageMatch[1], 10) : null, @@ -456,6 +461,14 @@ async function scrapeZhaopin(maxCount = 20, fullMode = false, scoreOnly = false) if (refreshed) { await closeModal(page); log('页面已刷新(列表变化),重扫'); currentDataIndex = null; continue; } const data = await extractModalData(page); + // v10.8:候选人级提示(对方已关闭求职等)→ 跳过该人继续,不是平台阻碍 + if (data?.candidateLevelNotice && !data?.name) { + log(`⊘ 候选人状态提示,跳过: ${(data.rawText || '').split('\n').filter(Boolean)[0] || '(空)'}`); + await closeModal(page); + skipped++; + currentDataIndex = await navigateToNextCard(page, currentDataIndex); + continue; + } // v10.6 阻碍即停:弹窗不是有效简历(限额/提示页/空数据)→ 不入库,立即熔断 if (data?.modalBlocked) { const snippet = (data.rawText || '').split('\n').filter(Boolean).slice(0, 3).join(' / ').slice(0, 120);