SHEIN 40/40 + Temu 全托管 46/46 批量进待发布;补 shbatch/tmbatch 配方、类目弹窗必须关、SHEIN 规格上限3、必填属性兜底、EAN 游标落盘
This commit is contained in:
1 parent
cdde45ed9a
commit
fd4cc6619b
16 files changed
+1260
-41
No files matched your search
@@ -0,0 +1,13 @@
|
||||
import { newPage, closePage, wait } from './sh_lib.mjs';
|
||||
import { SAN as S } from '/tmp/cdp3.mjs';
|
||||
const c = await newPage('https://www.dianxiaomi.com/web/sheinProduct/offline');
|
||||
await wait(13000);
|
||||
const o = await c.evalJS(`(()=>{
|
||||
const body=(document.body.innerText||'').replace(/\\s+/g,' ');
|
||||
const m=body.match(/共\\s*\\d+\\s*条/);
|
||||
const rows=[...document.querySelectorAll('.vxe-body--row')].slice(0,3).map(r=>(r.innerText||'').replace(/\\s+/g,' ').trim().slice(0,110));
|
||||
const shops=[...new Set([...document.querySelectorAll('.vxe-body--row')].map(r=>{const m=(r.innerText||'').match(/[①-⑳][^\\s]{2,20}/); return m?m[0]:''}).filter(Boolean))];
|
||||
return JSON.stringify({total:m?m[0]:'', rows, shops});})()`);
|
||||
console.log(S(String(o)).slice(0,900));
|
||||
try{ await c.shot('/tmp/shein_offline.jpg'); console.log('shot ok'); }catch(e){ console.log('shot fail'); }
|
||||
await closePage(c); process.exit(0);
|
||||
Reference in new issue
Block a user