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(1200); const o = await c.evalJS(`(()=>{ const ins=[...document.querySelectorAll('input')].filter(e=>e.offsetParent!==null).map(e=>({ type:e.type||'', ph:e.placeholder||'', cls:String(e.className).slice(0,44), name:e.name||'', id:e.id||''})); const btns=[...document.querySelectorAll('button,a[role=button],.btn')].filter(e=>e.offsetParent!==null) .map(e=>({t:(e.innerText||'').trim().slice(0,12), cls:String(e.className).slice(0,40)})).filter(x=>x.t).slice(0,10); const imgs=[...document.querySelectorAll('img')].filter(e=>e.offsetParent!==null&&/captcha|code|verify/i.test(e.src||'')).map(e=>e.src.slice(0,80)); return JSON.stringify({ins:ins.slice(0,8), btns, captchaImgs:imgs.slice(0,3)});})()`); console.log('登录表单:', S(String(o)).slice(0,900)); process.exit(0);