Loading...
Loading...
店铺巡检工作流:编排 store list + store open + page visit + page screenshot 完成店铺状态检查和截图巡检。适用于定期检查店铺页面状态、批量截图存档。
npx skill4agent add ziniao-open/skills ziniao-workflow-store-patrol../ziniao-shared/SKILL.mdziniao-cli config initstore list ──► 获取所有店铺
│
├──► 对每个店铺:
│ store open --id <id> --url <target>
│ page wait-nav --store-id <id>
│ page screenshot --store-id <id> --full-page
│ store close --id <id>
│
└──► 汇总报告ziniao-cli store list --format table# 打开店铺并导航到目标页面
ziniao-cli store open --id <storeId> --url "https://www.amazon.com"
# 等待页面加载
ziniao-cli page wait-nav --store-id <storeId>
# 全页截图
ziniao-cli page screenshot --store-id <storeId> --full-page
# 可选:提取页面数据
ziniao-cli page extract --store-id <storeId>
# 关闭店铺
ziniao-cli store close --id <storeId>## 店铺巡检报告
| 店铺 | 状态 | 截图 | 备注 |
|------|------|------|------|
| Rosehut | 正常 | 已截图 | — |
| US Store | 异常 | 已截图 | 页面加载超时 |ziniao-cli store open --id <storeId> --url "https://www.amazon.com" --headlessziniao-cli page visit --store-id <storeId> --url "https://sellercentral.amazon.com" --wait-until networkidle# 提取页面文本,判断是否出现错误提示(403、验证码、封号)
ziniao-cli page content --store-id <storeId> --content-format text
# 查询特定异常元素是否存在
ziniao-cli page query --store-id <storeId> --selector ".captcha-container, .error-page, #auth-warning"# 只巡检名称含 "US" 的店铺
ziniao-cli store list --keyword "US"
# 只巡检前 5 个店铺(调试用)
ziniao-cli store list --limit 5ziniao-cli page screenshot --store-id <storeId> --full-page --path "./patrol/store-<storeId>.png"ziniao-cli store open --id <storeId>
ziniao-cli page visit --store-id <storeId> --url "https://sellercentral.amazon.com" --wait-until networkidle
ziniao-cli page screenshot --store-id <storeId> --path "./patrol/<storeId>-seller-central.png"
ziniao-cli page visit --store-id <storeId> --url "https://www.amazon.com/dp/ASIN" --wait-until networkidle
ziniao-cli page screenshot --store-id <storeId> --path "./patrol/<storeId>-listing.png"
ziniao-cli store close --id <storeId>ziniao-cli automation run --steps '[
{"type": "visit", "url": "https://www.amazon.com", "waitUntil": "networkidle"},
{"type": "screenshot", "fullPage": true, "path": "./patrol/<storeId>.png"}
]'# 页面加载慢时增加超时(默认 30s)
ziniao-cli page wait-nav --store-id <storeId> --timeout 60000
ziniao-cli page screenshot --store-id <storeId> --timeout 15000wait-nav