import { attach } from '/tmp/cdp3.mjs'; const c = await attach('/web/temu/add') || await attach('dianxiaomi.com'); const o = await c.evalJS(`(()=>{ const boxes=[...document.querySelectorAll('*')].filter(e=>e.offsetParent!==null&&/颜色/.test(e.innerText||'')&&e.querySelectorAll('input').length>0&&e.querySelectorAll('*').length<300); const box=boxes[boxes.length-1]; if(!box)return'nf'; const ins=[...box.querySelectorAll('input')].map(i=>({ph:i.placeholder||'',type:i.type,cls:String(i.className||'').slice(0,45)})); const btns=[...box.querySelectorAll('button,a,span')].filter(e=>e.offsetParent!==null&&(e.innerText||'').trim()).slice(0,10).map(e=>({tag:e.tagName,t:(e.innerText||'').trim().slice(0,14)})); return JSON.stringify({txt:(box.innerText||'').replace(/\\s+/g,' ').slice(0,260), ins, btns, html:box.innerHTML.slice(0,400)},null,1);})()`); console.log(String(o).slice(0,1500)); process.exit(0);