mcpField
C
cli-anything-web-yu-pri

cli-anything-web-yu-pri

github.com/hkuds生产力57.6k200 次安装5 周前更新
代码仓库

关于 cli-anything-web-yu-pri

Web Yu-pri CLI 是用于填写日本邮便 Web Yu-pri 寄件内容的命令行工具。它支持结构化商品数据、试运行和浏览器表单填写,并不会替用户执行最终寄件确认。

主要功能

  1. 01从 JSON 或 CSV 填写内容
  2. 02通过试运行预览表单填写
  3. 03检查页面状态和选择器
  4. 04使用持久化浏览器配置

适用场景

  1. 01录入多条寄件商品明细
  2. 02填写前核对申报价值
  3. 03诊断内容页面控件

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/hkuds/cli-anything --skill cli-anything-web-yu-pri

安装后在 Claude Code 中输入/cli-anything-web-yu-pri确认已加载。

详细介绍

Web Yu-pri 命令行工具

当任务涉及在日本邮政 Web Yu-pri 页面 https://mgr.post.japanpost.jp/C30P01Action.do 录入面单信息时,尤其是重复录入内容行时,请使用此技能。

安装

pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=web-yu-pri/agent-harness

如果未找到浏览器:

python -m playwright install chromium

安全规则

  • 不要将日本邮政凭据放入命令、文件、日志或提示词中。
  • 使用 open-login,以便用户在持久化配置文件中手动登录。
  • 在实际填写表单之前,先运行 contents fill ... --dry-run --json。
  • 此命令行工具不会点击最终的发货确认或购买按钮。
  • 当源数据包含单独的奖项/类别行时,请保持物品行相互独立,同时保留所要求的申报总价。

常用命令

cli-anything-web-yu-pri --json doctor
cli-anything-web-yu-pri open-login
cli-anything-web-yu-pri --json status --url https://mgr.post.japanpost.jp/M060800.do
cli-anything-web-yu-pri --json plan items.json
cli-anything-web-yu-pri --json contents fill items.json --dry-run
cli-anything-web-yu-pri --json contents fill items.json --total-value 17000

物品文件

JSON:

{
  "items": [
    {"description": "Award plaque", "value": 8000, "quantity": 1, "country": "KR"},
    {"description": "Certificate", "value": 9000, "quantity": 1, "country": "KR"}
  ]
}

CSV 表头可以使用以下别名:

  • description:description、desc、content、contents、item、name、pkg
  • value:value、declared_value、cost、price、amount、yen、jpy
  • quantity:quantity、qty、num、count
  • country:country、country_code、country_of_origin、origin、couCd、cou_cd
  • HS code:hs_code、hs、hscode、hsCode

默认情况下,value 被视为该行的申报价值。当 value 应乘以数量时,请使用 --value-mode unit。

选择器诊断

cli-anything-web-yu-pri --json selectors
cli-anything-web-yu-pri snapshot --url https://mgr.post.japanpost.jp/M060800.do -o page.png --html-output page.html

已知的内容页面控件:

  • #M060800_itemBean_pkg
  • #M060800_itemBean_cost_value
  • #M060800_itemBean_num_value
  • #M060800_itemBean_couCd
  • #M060800_itemBean_hsCode
  • #M060800_shippingBean_pkgType
  • #M060800_shippingBean_pkgTotalPrice_value
  • #M060800_ShippingBean_danger
  • submitCommand('itemAdd2')

评论

支持 Markdown