Bilibili alarmclock
Project description
B 站装扮编号小闹钟,用于定时刷新并展示指定装扮信息(名称、粉丝编号、头像以及剩余库存)。项目最初开发于 2021 年,目前已经针对最新的 B 站接口做了兼容性调整。
项目亮点
通过非官方接口实时获取 B 站装扮信息,自动绕过 412 限流。
图形界面基于 PyQt5,展示装扮名称、粉丝编号、更新时间及装扮背景。
支持自定义刷新间隔,默认限制为一分钟,以避免被接口限流。
运行环境
Python 3.9+
依赖库:PyQt5、requests
推荐在 Windows 环境下运行(原始项目即针对 Windows 打包),其它桌面平台可自行测试。
快速开始
克隆项目仓库并进入目录:
git clone https://github.com/chuiba/garb_alarm_clock.git cd garb_alarm_clock创建虚拟环境并安装依赖:
python -m venv .venv .venv\\Scripts\\activate pip install PyQt5 requests启动小闹钟:
python -m garb_alarm_clock或者在 IDE 中运行 garb_alarm_clock/__init__.py 文件。
使用说明
提醒编号:输入要监控的粉丝卡提醒 ID。
装扮编号:输入装扮的 item_id,点击 开启 后即可加载对应数据。
刷新间隔:单位为秒。小于 60 秒时会被自动重置为 60 秒,以防止频繁请求。
计时器归零时会自动重新请求接口并更新界面背景、头像和粉丝编号。
接口兼容性
B 站在 2023 年之后对装扮接口增加了浏览器校验。本项目已经在 garb.py 中补充了浏览器标识头,如需二次开发请保留 User-Agent、Origin、Referer 这些请求头。若出现 412 错误,可尝试:
确认本地网络未拦截 https://api.bilibili.com
调整刷新间隔,避免短时间内请求过多
在请求头中加入当前常用浏览器的 User-Agent
开发与打包
代码风格基于 Cookiecutter Python Package 模板。
开发依赖可通过 pip install -r requirements_dev.txt 安装。
文档位于 docs/,使用 Sphinx 构建:
cd docs make html
许可证
本项目以 MIT 许可证发布,详情见 LICENSE。
======= History =======
0.2.0 (2025-09-20)
兼容最新 B 站装扮接口,请求自动携带浏览器头信息。
更新文档,补充运行指南和使用说明。
0.1.0 (2021-04-17)
首次发布。
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file garb_alarm_clock-0.2.1.tar.gz.
File metadata
- Download URL: garb_alarm_clock-0.2.1.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
620fce8547f50584b3b29041345e1b41ff9a1c263dc5c22545a71a00dc4d4c93
|
|
| MD5 |
40df401321710c912697bea00f8768d3
|
|
| BLAKE2b-256 |
35da8d4ca9662c3d26a4add8db92aa580b14ee9f39b496385fcbdfc6432cfa74
|
Provenance
The following attestation bundles were made for garb_alarm_clock-0.2.1.tar.gz:
Publisher:
release.yml on chuiba/garb_alarm_clock
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
garb_alarm_clock-0.2.1.tar.gz -
Subject digest:
620fce8547f50584b3b29041345e1b41ff9a1c263dc5c22545a71a00dc4d4c93 - Sigstore transparency entry: 543067521
- Sigstore integration time:
-
Permalink:
chuiba/garb_alarm_clock@50850ce1060452b7e05eeba53889c36f8eb80223 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/chuiba
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@50850ce1060452b7e05eeba53889c36f8eb80223 -
Trigger Event:
push
-
Statement type:
File details
Details for the file garb_alarm_clock-0.2.1-py2.py3-none-any.whl.
File metadata
- Download URL: garb_alarm_clock-0.2.1-py2.py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f79397b2e9a3604fc077dfa6282cd325678134148e79242d7737887579186e5e
|
|
| MD5 |
6e172b13cdcbb06adad5a306f47f406b
|
|
| BLAKE2b-256 |
662f9909a66c05658efefa1352314c6c263f1f88060c04800a9c835f22c60782
|
Provenance
The following attestation bundles were made for garb_alarm_clock-0.2.1-py2.py3-none-any.whl:
Publisher:
release.yml on chuiba/garb_alarm_clock
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
garb_alarm_clock-0.2.1-py2.py3-none-any.whl -
Subject digest:
f79397b2e9a3604fc077dfa6282cd325678134148e79242d7737887579186e5e - Sigstore transparency entry: 543067524
- Sigstore integration time:
-
Permalink:
chuiba/garb_alarm_clock@50850ce1060452b7e05eeba53889c36f8eb80223 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/chuiba
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@50850ce1060452b7e05eeba53889c36f8eb80223 -
Trigger Event:
push
-
Statement type: