import { listPages, wait } from '/home/admin9webs/shein建品/sh_lib.mjs'; import { CDP, SAN as S } from '/tmp/cdp3.mjs'; const t = (await listPages()).find(x=>/91miaoshou/i.test(x.url)); const c = await CDP.connect(t.webSocketDebuggerUrl); await c.send('Runtime.enable'); await wait(1500); const o = await c.evalJS(`(()=>{ const hits=[]; for(const e of document.querySelectorAll('*')){ if(e.offsetParent===null) continue; if(e.children.length>0) continue; const t=(e.innerText||'').trim(); if(t && t.length<=12 && /采集|刊登|产品|导入|认领|搬家/.test(t)) hits.push({t, cls:String(e.className).slice(0,40), pcls:String((e.parentElement||{}).className||'').slice(0,40)}); } const uniq=[]; const seen=new Set(); for(const h of hits){ if(!seen.has(h.t)){seen.add(h.t); uniq.push(h);} } return JSON.stringify(uniq.slice(0,25));})()`); console.log('菜单候选:', S(String(o)).slice(0,1200)); process.exit(0);