import { CDP, SAN } from '/tmp/cdp3.mjs'; const list=await (await fetch('http://127.0.0.1:9223/json/list')).json(); const t=list.find(x=>x.type==='page'&&/dianxiaomi/.test(x.url)); if(!t){console.log(' ❌');process.exit(0);} const c=await CDP.connect(t.webSocketDebuggerUrl); await c.send('Runtime.enable'); const r=await c.evalJS(`(async()=>{ const j=await (await fetch('/api/userIn.json',{headers:{'X-Requested-With':'XMLHttpRequest'}})).json(); const sm=(j.data||{}).shopMap||{}; const rows=Object.keys(sm).map(k=>({id:k, name:String(sm[k].name||''), plat:String(sm[k].platform||sm[k].site||'')})); const target=rows.find(x=>x.id==='4248777'); return JSON.stringify({n:rows.length, target, yejet:rows.filter(x=>/yejet/i.test(x.name)).slice(0,8)});})()`, true); const d=JSON.parse(r); console.log(' shopMap 共', d.n, '个店铺'); console.log(' ══ shopId=4248777 是 ══'); console.log(' ', SAN(JSON.stringify(d.target)).slice(0,220)); console.log('\n 名称含 yejet 的店铺:', SAN(JSON.stringify(d.yejet)).slice(0,300)); c.close();