Skip to content

HaTickets v0.4.1

Choose a tag to compare

@github-actions github-actions released this 05 May 10:31
· 47 commits to master since this release
12df39e

HaTickets v0.4.1(用户版发布说明)

发布日期:2026-05-05

这是一个维护型 patch:识别更稳、安装更省心、Python 版本兼容范围更准。日常用法不变。

你会直接感受到的变化

  • 「立即预订」也能识别了:大麦 App 把开售按钮文案在「立即购票 / 立即预定 / 立即预订 / 立即抢票」之间换来换去,这次把全集合都囊括了,不会再因为按钮文案变化漏抢。
  • 缺依赖时报错友好:直接 python mobile/damai_app.py 时若忘了 poetry install,会报「请先在仓库根目录运行 poetry install」而非 ModuleNotFoundError: No module named 'selenium'。
  • Python 3.14 装不上的提示更早:本版本明确不支持 Python 3.14(部分依赖的 wheel 还没就绪)。建议使用 Python 3.13 或 3.12。
  • 抢票热路径速度:实测平均 2.93 秒(v0.4.0 时代基线 4.37 秒),约快 1/3。

推荐使用流程(保持 4 步)

  1. 安装依赖
    poetry install
  2. 连接手机,确认 adb devices 能识别
  3. 先做安全探测(不提交订单)
    ./mobile/scripts/start_ticket_grabbing.sh --probe --yes
  4. 正式抢票
    ./mobile/scripts/start_ticket_grabbing.sh --yes

自然语言入口(可选,与 v0.4.0 一致)

./mobile/scripts/run_from_prompt.sh --mode probe --yes "给张三抢 5 月 20 号张杰北京站演唱会内场票,价位 1680 元"

从 v0.4.0 升级注意

  • 直接 git pull && poetry install 即可,没有必填配置项变化。
  • 如果你的 Python 是 3.14.x,请降级到 3.13 或 3.12 后重新 poetry install。
  • 如果你 fork 过仓库并直接 import 了 mobile.damai_app 内部的 helper(如 _find、_click_coordinates),现在它们已搬到 mobile/ui_primitives.py;公共主流程接口未变。

已知边界

  • 线上库存、风控、验证码会影响结果,自动化不保证 100% 成功。
  • 建议每次正式抢票前先跑一次 --probe 确认页面识别正常。
  • 多场次(音乐节)选择仍偶有边界,临时方案:在 config.jsonc 中开启 rush_mode: true。