DSH Plugins Marketplace

DSH Plugins

Plugins

/

apple-cn-checkout

C

apple-cn-checkout

Discovered

Fully Automated iPhone Flash Sale Script

Machine translated

全自动抢购 iPhone 脚本

skill 名:apple-cn-checkout —— 用浏览器自动化在苹果中国官网 apple.com.cn 完成 iPhone 选购与结账, 附实测稳定选择器、静默失败陷阱清单、CDP 计时的耗时预算、以及多入口降级梯子。

English TL;DR — An agent skill for buying iPhones on Apple's China store (apple.com.cn) through browser automation. It ships measured-stable selectors, a list of failures that happen silently (no error, no navigation), a CDP-measured latency budget for every step, and a 3-path entry ladder with retry-before-degrade. All numbers here are measured, not estimated.


为什么需要它

Apple 中国官网的结账页有一批不会报错的失败。你点了按钮、工具返回"已点击", 但什么都没发生 —— 这比报错更危险:

陷阱现象正确做法
点击后立刻读取是旧 DOM徽标/URL 都滞后,会误判成功唯一可信验证 = 重新导航到目标页再读(服务端真相)
waitUntil: networkidle 永不满足页面有持续遥测,等到超时永不使用;改用具体元素门控
用 CSS 猜选择器会打偏猜的 button[data-autom*="remove"] 命中了别的元素只用以 data-autom 为准的实测选择器
隐藏的 radio 用 visible 等不到白白等 10 秒超时用 state:"attached" + :not([disabled])(实测 7ms)
限购静默拦截「结账」袋内同一 iPhone > 2 部时,点「结账」完全无反应(按钮也不是 disabled)结账前预检页面是否含「最多可购买」
按钮在转圈时点击会点空到达新步骤立刻点 → 点空 → 后续连锁超时每步用 :not([disabled]) 等启用再点

内容

SKILL.md                  ← 技能本体(12 节,可直接给 agent 读)
scripts/
  battle.sh               ← 抢购总脚本:多入口降级 + 每步门控 + 实时换路
  monitor.sh              ← 开闸监控(两级探测,判定"可提交"后退出 0)
  buy.sh                  ← 开闸后的极速链(配置→提交→进入结账)
  preflight.sh            ← 开抢前的就绪自检
  smoke-test.sh           ← 探测逻辑自测
  abnormal5.sh            ← 故障注入 × 5(验证降级梯子)
  bench5.sh / bench-warm.sh ← 入口路径基准(冷/热)
  cleanup.sh              ← 收尾(撤规则/还原页面)
  rules.json / rule-*.json ← `debug` 网络规则样本
  apple-bookmarks.html    ← 书签(可导入 Edge/Chrome)
docs/
  measurements.md         ← 全部原始实测数据(CDP 指标、端点耗时、路径基准、故障演练)
  battle-plan.md          ← 抢购作战计划

安装

作为 DSH 技能:

git clone git@github.com:Caoran1314/apple-cn-checkout.git
cp -r apple-cn-checkout "$HOME/.dsh/skills/apple-cn-checkout"

或只要技能本体:把 SKILL.md 放进 ~/.dsh/skills/apple-cn-checkout/SKILL.md。

依赖

  • BrowserSkill:bsk CLI + 浏览器扩展(提供 bsk_* 工具与 bsk 命令)
  • 目标站点:https://www.apple.com.cn/(中国站,不是 apple.com)

实测数据摘要

三条购买入口(n=5,口径:出发 → 「提交按钮已启用」)

路入口最快中位最慢均值排名
A深链 SKU /shop/buy-iphone/<机型>/<sku>976ms1025ms1433ms1102ms🥇
C热/shop/bag 已预热 → 点收藏「继续」1250ms1284ms1694ms1361ms🥈
B通用购买页(需手配 3 项)1446ms1488ms2916ms1764ms🥉
C冷现加载 /shop/bag → 收藏 → 继续2599ms3289ms3651ms3131ms❌

关键结论:收藏 → 继续 的落点就是路 A 的深链 URL → A 与 C 一荣俱荣、一损俱损, B 是唯一能兜底的路。而预热购物车页能把 C 从 3289ms 降到 1284ms(≈A)。

结账各步实测耗时(设超时按这个)

步骤实测
添加到购物袋~1.3–2.1s
结账 → 订单选项4.0–10.8s
继续填写送货地址0.9–2.3s
继续选择付款方式8.5–9.4s
选微信支付~0.05s
检查订单 → 查看订单19.4–19.7s
立即下单 → 二维码7.3–34.4s

「转圈」的真相(CDP 实测)

主线程 long task 全程只有 0–2 个、合计 51–126ms,而文档 DCL 可达 7.5s —— Apple 结账是「网络受限」,不是「渲染受限」。慢的是服务端:

端点次数平均
/shop/fulfillment-messages10815ms(结账那 8s 的主因)
secure6/shop/checkoutx/fulfillment14161ms
secure6/shop/bag/status13205ms
/shop/favoritesx/fetch2803ms(收藏异步加载的源头)
/shop/updateSEO · product-gallery · applecare/data3–637–48ms(配置点击"秒生效"的原因)

降级梯子(故障注入 × 5,全部一致)

阻断深链文档后:路A 试 3 次(退避 2s→4s)→ 路C 试 2 次 → 路B 试 1 次成功, 每轮 80–83 秒,5/5 零抖动。证明"同路重试优先于换路"这条策略成立。

安全边界

  • 不代填任何凭据:登录 / OTP / 支付确认走人工(request-help)
  • 不自动点「立即下单」:battle.sh 默认停在「查看订单」页(PLACE_ORDER=0)
  • 全部数据来自公开站点页面的实测,不含任何个人账号信息

License

MIT

Comments

Loading…

Similar plugins

dsh-ios-control

by Hjay1101

DeepSeek Harness 插件:手机扫码遥控电脑上的 agent —— 在 dsh-remote-link 基础上增强会话持久化(dsh 重启后已配对设备保持登录)、iOS 主屏图标等

Manifest valid

★ 0

MIT

JavaScript

Aug 23, 2026

dsh plugin --profile web add dsh-ios-control

by qkycir-123

Automatically turn successful DeepSeek Harness sessions into reusable, reviewable Agent Skills.

Tools & CapabilitiesManifest valid

★ 110

↓ 544/wk

MIT

TypeScript

Oct 1, 2026

dsh plugin --profile web add dsh-run2skill

by cindyguyuehu123

Use DeepSeek Harness from your iPhone / iPad: LAN reverse proxy, iOS PWA (add-to-home-screen) chrome, and touch/mobile CSS for the web GUI

UI & ExperienceManifest valid

★ 6

↓ 4.2k/wk

MIT

TypeScript

Aug 15, 2026

dsh plugin --profile web add dsh-mobile

by AnonyJcy

Mobile & iPad touch optimization plugin for DeepSeek Harness Web GUI

Manifest valid

★ 0

MIT

TypeScript

Aug 28, 2026

dsh plugin --profile web add @anonyjcy/dsh-plugin-mobile-touch

by radres

Your DeepSeek Harness agent rings your actual phone: it asks out loud, you answer out loud, and what you said steers the run.

Tools & CapabilitiesManifest valid

★ 8

MIT

JavaScript

Oct 3, 2026

dsh plugin --profile web add dsh-plugin-call-me

by yuanzhenqi

Phone-first drawer shell for DSH Web. Collapses the session list into a tap-to-open drawer, keeps header plugin actions, and turns Settings into a full-width sheet.

UI & ExperienceDevelopment & InfrastructureTerminal & ClientsManifest valid

★ 1

↓ 800/wk

MIT

JavaScript

Sep 1, 2026

dsh plugin --profile web add dsh-mobile-ui