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);