Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

GLM Coding Sniper

智谱 GLM Coding Plan 套餐抢购脚本。多线程并发轮询,毫秒级检测套餐开放,自动刷新浏览器页面。

功能

  • 多线程并发轮询(3 线程,每秒约 100 次请求)
  • 自动等待到开抢时间,提前 3 秒开始轮询
  • 检测到套餐可购买后,AppleScript 自动刷新 Chrome
  • 自动 preview 获取价格信息
  • 抢购结果保存到 JSON

使用

1. 获取 Token

Chrome 打开 bigmodel.cn → F12 → Application → Cookies → 复制 bigmodel_token_production

2. 配置

编辑 grab_api.py 顶部:

TOKEN = "your_token_here"
TARGET_PRODUCT = "product-b8ea38"  # 套餐 ID
TARGET_HOUR = 10                   # 开抢时间(小时)
TARGET_MINUTE = 0                  # 开抢时间(分钟)

3. 运行

pip install requests
python grab_api.py

4. 抢购流程

  1. 脚本自动等待到开抢时间
  2. 多线程并发检测套餐状态
  3. 检测到 soldOut=false 后自动刷新 Chrome
  4. 在浏览器中点击购买按钮完成支付

配置项

参数 默认值 说明
POLL_THREADS 3 并发轮询线程数
POLL_INTERVAL 0.03 每线程轮询间隔(秒)
PRE_START_SECONDS 3 提前开始轮询的秒数
PREVIEW_RETRIES 5 Preview 重试次数

注意

  • Token 有时效性,每次使用前需更新
  • 仅支持 macOS(AppleScript 刷新 Chrome)
  • 请合理使用,避免过度请求

License

MIT

About

Minimal desktop countdown widget for macOS — year, month, week progress bars in Apple Control Center style. Built with Hammerspoon.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages