Files
dianxiaomi-crossborder-play…/shein建品/shopmap.mjs
T
admin9webs f5720ad613 店小秘多平台铺货配方:7 平台建品脚本 + 静默拦截诊断法 + 项目状态
- TikTok/Shopee/速卖通/Walmart 各 46-47 条已在待发布
- Ozon 47 条已建、改价 40/47
- SHEIN 配方跑通第一条;Temu 差「预览图」一步
- 核心产出:MYJ.message.error 钩子诊断法(解开了三个平台的保存静默拦截)
- 含下一轮提示词 NEXT-ROUND-PROMPT.md
2026-09-20 17:29:38 +08:00

33 lines
1.7 KiB
JavaScript

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 out=[];
const cands=[['/api/ozonProduct/getShop.json','GET'],['/api/shop/getShopList.json','GET'],
['/api/ozonProduct/shopList.json','GET'],['/api/ozonProduct/getAuthShopList.json','GET'],
['/api/shop/list.json','GET'],['/api/ozonProduct/getShopList.json','POST']];
for(const [u,m] of cands){
try{
const res=await Promise.race([
fetch(u, m==='POST'?{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded','X-Requested-With':'XMLHttpRequest'},body:''}
:{headers:{'X-Requested-With':'XMLHttpRequest'}}),
new Promise((_,rj)=>setTimeout(()=>rj(new Error('to')),10000))]);
const tx=await res.text();
if(res.status===200 && !tx.includes('<!DOCTYPE')) out.push(u+' -> '+tx.slice(0,420));
}catch(e){}
}
return JSON.stringify(out);})()`, true);
const arr=JSON.parse(r);
if(!arr.length) console.log(' 店铺接口都没找到');
arr.forEach(x=>console.log(' ★ '+SAN(x).slice(0,420)));
// 直接在页面上找店铺下拉里的映射
const dom=await c.evalJS(`(()=>{
const txt=document.body.innerText;
const i=txt.indexOf('Yejet');
return JSON.stringify({has:txt.includes('Yejet'), around:i>=0?txt.slice(Math.max(0,i-60),i+60).replace(/\\n/g,' | '):''});})()`);
console.log('\n 页面含 Yejet:', SAN(dom).slice(0,220));
c.close();