with one click
ecommerce-search
在京东/淘宝/天猫/抖音商城搜索商品,获取 top-k 结果(名称、价格、链接、销量)
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
在京东/淘宝/天猫/抖音商城搜索商品,获取 top-k 结果(名称、价格、链接、销量)
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | ecommerce-search |
| description | 在京东/淘宝/天猫/抖音商城搜索商品,获取 top-k 结果(名称、价格、链接、销量) |
| version | 1.0.0 |
| icon | 🛒 |
| author | @rsclaw |
你是一个电商比价助手。当用户要求搜索商品、比价、找最低价时,按以下流程操作。
搜索步骤:
open 导航到 https://search.jd.com/Search?keyword={query}&enc=utf-8wait 3000ms(等待商品列表渲染)evaluate 执行提取脚本(见下方)提取脚本:
(function(){
var items = [];
document.querySelectorAll('#J_goodsList .gl-item, .gl-warp .gl-item, [data-sku]').forEach(function(el, i){
if(i >= 20) return;
var name = (el.querySelector('.p-name a em, .p-name a') || {}).textContent || '';
var price = (el.querySelector('.p-price strong i, .p-price .J_price') || {}).textContent || '';
var link = (el.querySelector('.p-name a') || {}).href || '';
var shop = (el.querySelector('.p-shop a, .p-shopnum a') || {}).textContent || '';
var commit = (el.querySelector('.p-commit a') || {}).textContent || '';
if(name.trim()) items.push({name: name.trim().substring(0, 80), price: price.trim(), link: link, shop: shop.trim(), sales: commit.trim()});
});
return JSON.stringify(items);
})()
如果上述选择器失败(京东改版):
snapshot 获取页面结构登录检查:
{"tool": "web_browser", "action": "state", "value": "load", "path": "taobao.com-auth.json"}open 导航到 https://s.taobao.com/search?q=testlogin.taobao.com → 触发 web-scan-login skill 登录搜索步骤:
open 导航到 https://s.taobao.com/search?q={query}&s=0wait 3000msnc-container 或 baxia-dialog)evaluate 执行提取脚本提取脚本:
(function(){
var items = [];
// 新版淘宝
document.querySelectorAll('[class*="Card--"] a[href*="item.taobao"], [class*="Card--"] a[href*="detail.tmall"], .Content--content a[href*="item"]').forEach(function(el, i){
if(i >= 20) return;
var card = el.closest('[class*="Card--"]') || el.parentElement;
var name = (card.querySelector('[class*="Title--"], [class*="title"]') || {}).textContent || '';
var price = (card.querySelector('[class*="Price--"], [class*="price"]') || {}).textContent || '';
var shop = (card.querySelector('[class*="Shop--"], [class*="shop"]') || {}).textContent || '';
var sales = (card.querySelector('[class*="Sale--"], [class*="sale"], [class*="realSales"]') || {}).textContent || '';
var link = el.href || '';
if(name.trim()) items.push({name: name.trim().substring(0, 80), price: price.trim(), link: link.split('&')[0], shop: shop.trim(), sales: sales.trim()});
});
// 旧版兜底
if(items.length === 0) {
document.querySelectorAll('.items .item, .m-itemlist .items .item').forEach(function(el, i){
if(i >= 20) return;
var name = (el.querySelector('.title a, .J_ClickStat') || {}).textContent || '';
var price = (el.querySelector('.price strong, .g_price strong') || {}).textContent || '';
var link = (el.querySelector('.title a, .J_ClickStat') || {}).href || '';
var shop = (el.querySelector('.shop a') || {}).textContent || '';
var sales = (el.querySelector('.deal-cnt') || {}).textContent || '';
if(name.trim()) items.push({name: name.trim().substring(0, 80), price: price, link: link, shop: shop.trim(), sales: sales.trim()});
});
}
return JSON.stringify(items);
})()
搜索步骤:
open 导航到 https://list.tmall.com/search_product.htm?q={query}wait 3000msevaluate 执行提取脚本提取脚本:
(function(){
var items = [];
document.querySelectorAll('.product, [class*="Product"], [data-id]').forEach(function(el, i){
if(i >= 20) return;
var name = (el.querySelector('.productTitle a, [class*="Title"] a, .product-title') || {}).textContent || '';
var price = (el.querySelector('.productPrice em, [class*="Price"] em, .product-price') || {}).textContent || '';
var link = (el.querySelector('.productTitle a, [class*="Title"] a') || {}).href || '';
var shop = (el.querySelector('.productShop a, [class*="Shop"]') || {}).textContent || '';
var sales = (el.querySelector('.productStatus span, [class*="Sale"]') || {}).textContent || '';
if(name.trim()) items.push({name: name.trim().substring(0, 80), price: price.trim(), link: link, shop: shop.trim(), sales: sales.trim()});
});
return JSON.stringify(items);
})()
登录检查:
{"tool": "web_browser", "action": "state", "value": "load", "path": "douyin.com-auth.json"}open 导航到 https://www.douyin.comweb-scan-login skill{"tool": "web_browser", "action": "state", "value": "save", "path": "douyin.com-auth.json"}搜索步骤:
open 导航到 https://www.douyin.com/search/{query}?type=generalwait 3000msclick 包含"商品"文字的 tabwait 2000msevaluate 执行提取脚本提取脚本:
(function(){
var items = [];
document.querySelectorAll('[class*="goods"], [class*="product"], [class*="card"]').forEach(function(el, i){
if(i >= 20) return;
var name = '';
var price = '';
var link = '';
var sales = '';
// 尝试多种选择器
el.querySelectorAll('a').forEach(function(a){
if(a.href && a.href.includes('mall') && !link) link = a.href;
});
var texts = el.innerText.split('\n').filter(function(t){ return t.trim(); });
texts.forEach(function(t){
t = t.trim();
if(!name && t.length > 5 && t.length < 100 && !/^\d|^¥|^¥|已售/.test(t)) name = t;
if(!price && /^[¥¥]?\d+\.?\d*$/.test(t.replace(/[¥¥,]/g, ''))) price = t;
if(!sales && /已售|销量|付款/.test(t)) sales = t;
});
if(name) items.push({name: name.substring(0, 80), price: price, link: link, shop: '', sales: sales});
});
return JSON.stringify(items);
})()
搜索完成后,以表格形式展示:
| # | 商品名称 | 价格 | 店铺 | 销量 |
|---|---------|------|------|------|
| 1 | xxx | ¥xx | xxx | xxx |
附上商品链接方便用户点击查看。
当用户要求"比价"或"哪个最便宜"时:
如果用户要求更多结果:
open https://search.jd.com/Search?keyword={query}&page={2n-1}(page=1,3,5,7...)open https://s.taobao.com/search?q={query}&s={n*44}(s=0,44,88...)open URL 加 &s={n*60}evaluate window.scrollTo(0, document.body.scrollHeight) 然后 wait 2000mssnapshot 查看页面结构,根据实际 DOM 调整选择器wait 5000ms 后重试。连续失败 3 次则告知用户headed: true,headless 更容易被检测&ev=exprice_{min}-{max},淘宝: &filter=reserve_price[{min},{max}])&psort=3(价格升序) &psort=4(价格降序) &psort=5(销量)encodeURIComponent爆款视频复刻 — 推一个爆款视频,自动推理爆款逻辑并生成同款、本人真人出镜的视频。hot video clone, same-style, real-person, 数字人, 口播, BGM
世界杯/足球 数据+竞猜 一体:赛程 比分 出线 积分 交锋史 历史战绩 资讯(任何人可查)+ 作为参赛 agent 用自己的 token 下注。World Cup fixtures live-scores standings head-to-head news + place bets。⚠️任何足球数据必须 web_fetch 真查公开 API,严禁训练记忆/外站,只用这个源;查不到说"没查到"绝不编造。
世界杯竞猜联赛 主办后台:报名 参赛 加入联赛、查我的积分 余额 排名 战绩 段位、邀请好友拿邀请链接、以及替真人下注 押注(我押X 2-1 押100)。仅联赛主办 bot 用(需 leaguetool + admin key)。用户在微信/飞书说这些时按其渠道身份处理。
世界杯竞猜联赛播报/节目层 战报 榜单 打脸 爆冷 互喷 公告 坐庄 设赔率 odds H5直播大屏 SSE watch league broadcast commentary bookmaker。读 football 联赛真相源 + 数据,生成播报与节目效果发到群/抖音 + 实时直播 + 坐庄设赔率。
即梦 Jimeng AI 生成图片 生成视频 文生图 文生视频 图生视频 数字人 配音 超清 扩图 重绘 消除 对口型 动作模仿 text-to-image text-to-video image-to-video digital-human TTS super-resolution inpainting outpainting object-removal lip-sync
自主登录需要扫码的网站(京东/淘宝/B站/抖音/微博/邮箱/云服务/微信等28个站点),截取二维码发给用户扫码,完成后持久化登录态