// 下载团队成员页 HTML,检查表格文本载体 import fs from 'node:fs'; const data = JSON.parse(fs.readFileSync('e:/code/crm-backend-matt/.scratch/lanhu-latest/axure-v29.json', 'utf8')); const key = Object.keys(data.pages).find(k => k.includes('a3-1-1-1-8')); const entry = data.pages[key]; console.log('page:', key); console.log('html.src:', entry.html.src); console.log('html.sign_md5:', entry.html.sign_md5); const url = `https://lanhu-axure-file.oss-cn-beijing.aliyuncs.com/${entry.html.sign_md5}`; const res = await fetch(url, { headers: { 'User-Agent': 'Mozilla/5.0' } }); console.log('status:', res.status, 'content-type:', res.headers.get('content-type')); const txt = await res.text(); fs.writeFileSync('e:/code/crm-backend-matt/.scratch/lanhu-latest/team-page.html', txt, 'utf8'); console.log('saved, length:', txt.length); // 统计 HTML 结构特征 const stats = { '/g, '').replace(//g, '').replace(/<[^>]+>/g, ' '); const zhMatches = stripped.match(/[\u4e00-\u9fa5][\u4e00-\u9fa5A-Za-z0-9()()::、,,。.\-\/\s]{1,40}/g) || []; const uniq = [...new Set(zhMatches.map(s => s.trim()).filter(s => s.length >= 2))]; console.log('中文文本片段 unique:', uniq.length); uniq.slice(0, 80).forEach((s, i) => console.log(String(i + 1).padStart(3), s.slice(0, 60)));