本插件源自 glm_buyer/glm-coding(AegisFlow),移除了 Web 界面,所有交互改为 QQ 私聊指令;定时任务到期后会自动把支付二维码私聊发给 superuser。
特性
- 仅支持 superuser 私聊,群聊/临时会话均会被拒绝
- 原 GLM 协议默认值已内嵌到插件代码,零配置即可导入
- 账号导入、套餐选择、立即抢购、二维码查看、定时任务、暂停/恢复
- 内置代理池可自动启动(通过
proxy_pool.yaml配置) - 定时任务触发后自动私聊发送支付二维码
安装
pip install nonebot-plugin-glm-buyer
或在 NoneBot 项目目录下:
nb plugin install nonebot-plugin-glm-buyer
然后在 pyproject.toml 的 [tool.nonebot] 中添加:
plugins = ["nonebot_plugin_glm_buyer"]
配置
在 NoneBot 的 .env 文件中按需填写:
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
glm_buyer_data_dir |
否 | 空 | 数据目录;留空使用 nonebot-plugin-localstore 的插件数据目录 |
glm_buyer_ocr_workers |
否 | 4 | OCR 进程数 |
glm_buyer_log_level |
否 | INFO | 运行时日志级别 |
glm_buyer_log_retention_days |
否 | 7 | 运行时日志保留天数 |
glm_buyer_network_egress_mode |
否 | local | 网络出口模式:local 或 proxy_pool |
glm_buyer_fallback_proxy_url |
否 | http://127.0.0.1:17286 |
备用代理地址 |
glm_buyer_fallback_proxy_ticket_pool_only |
否 | false | 备用代理是否只用于抢票池 |
glm_buyer_proxy_pool_config |
否 | proxy_pool.yaml |
代理池配置文件路径 |
glm_buyer_tesseract_ocr_enabled |
否 | true | 是否启用 Tesseract 类 OCR |
glm_buyer_tesseract_ocr_timeout |
否 | 6 | OCR 超时(秒) |
glm_buyer_tesseract_ocr_min_confidence |
否 | 0.55 | OCR 最低置信度 |
glm_buyer_tesseract_captcha_max_retries |
否 | 3 | 验证码最大重试次数 |
glm_buyer_notify_superuser_on_schedule |
否 | true | 定时任务完成是否通知 superuser |
BigModel 域名、验证码 aid、浏览器指纹等协议参数已硬编码,一般无需修改。
使用
私聊机器人并 @ 它(或按适配器规则视为 to_me),发送:
glm 帮助
指令表
| 指令 | 说明 |
|---|---|
glm 帮助 |
显示帮助 |
glm 查看全部设置 |
查看当前生效的核心设置 |
glm 添加账号 <json> |
导入账号(token/cookie/指纹等) |
glm 账号列表 |
列出所有账号 |
glm 账号 <id> |
查看账号详情 |
glm 删除账号 <id> |
删除账号 |
glm 同步 <id> |
同步/预热账号状态 |
glm 换指纹 <id> |
刷新浏览器指纹 |
glm 套餐 <id> |
查看可选套餐 |
glm 设置套餐 <id> <product_id> |
设置账号要抢购的套餐 |
glm 启动 <id> |
立即执行一次抢购流程 |
glm 二维码 <id> |
获取当前支付二维码 |
glm 定时 <id> <cron> |
设置定时任务(秒级 cron,如 0 30 14 * * *) |
glm 取消定时 <id> |
取消账号定时任务 |
glm 暂停 <id> |
暂停当前运行/定时任务 |
glm 状态 <id> |
查看账号运行状态 |
glm 切换出口 <mode> |
切换网络出口:local 或 proxy_pool |
glm 日志 <id> |
查看账号最近日志 |
<id>为账号导入后返回的短 ID。
注意事项
- 本插件涉及支付流程,请仅在受信任环境、受信任账号下使用。
- 定时任务使用
nonebot-plugin-apscheduler的调度器,每秒轮询一次。 - 依赖
node用于腾讯验证码 TDC 收集,请确保环境中有可用 Node.js。 - 验证码 OCR 依赖
rapidocr、onnxruntime、opencv-python,已在安装依赖中列出。
License
MIT
Metadata
Release files for nonebot-plugin-glm-buyer 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nonebot_plugin_glm_buyer-0.1.3.tar.gz | 90.5 kB | Without provenance | Details for nonebot_plugin_glm_buyer-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_glm_buyer-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_glm_buyer-0.1.3-py3-none-any.whl |
Total release size: 191.3 kB
Release files / nonebot_plugin_glm_buyer-0.1.3.tar.gz
| Download URL | nonebot_plugin_glm_buyer-0.1.3.tar.gz |
|---|---|
| Size | 90.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e01fba9b59ab1b4d25a3ead15fdd7c5a36b37b1be8af050f9a5721021104263f
|
|
BLAKE2b-256 checksum How to use checksums |
68afa148046c7fc02a1f8138af0fd5997a08830367045ff9f334a24e6bff90f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / nonebot_plugin_glm_buyer-0.1.3-py3-none-any.whl
| Download URL | nonebot_plugin_glm_buyer-0.1.3-py3-none-any.whl |
|---|---|
| Size | 100.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ff11d38578ceac08a45f11c0efa59e6be6ad05d7704a628b674cbcf6288f1e0
|
|
BLAKE2b-256 checksum How to use checksums |
db3bad4609dc2671c8920f084987c8d6e494abb5d186336777041c4dc5320e98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Security for nonebot-plugin-glm-buyer 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.