netease-cloudmusic-detector (Python 版)
本项目基于Coooookies/netease-cloudmusic-detector这一开源项目,使用GLM5.0 Turbo进行重写为Python版本,并保留了原作者的LICENSE。在此感谢原作者的开源
本项目已上传到Pypi:网易云音乐检测器 ·PyPI
以下为AIGC内容
使用 Python 监听网易云音乐客户端正在播放中的音乐。
支持获取 SongId、暂停状态、歌曲进度,歌曲进度跟随进度条拖拽同步。仅支持 3.0 以上客户端。
环境要求
- Python >= 3.10
- Windows 系统已安装网易云音乐客户端 3.0+
- 客户端至少运行过一次(以生成 elog 文件)
安装
# 使用 uv
uv sync
# 或使用 pip
pip install -e .
使用
uv run python main.py
依赖
无第三方依赖,仅使用 Python 标准库。
文件结构
cloudmusic_detector/
├── __init__.py # 包入口
├── elog_analysis.py # 二进制解码 + 日志头解析
├── elog_listener.py # 文件轮询监听
├── constant.py # 路径常量 + 事件匹配规则
├── webdb.py # SQLite 只读查询
└── detector.py # 核心调度器
main.py # 示例入口
test_decode.py # 测试脚本
事件
| 事件名 | 触发时机 | 参数 |
|---|---|---|
play |
切歌时 | song_id: int |
status |
播放/暂停切换 | playing: bool |
position |
进度拖拽 | position: float |
Metadata
Release files for netease-cloudmusic-detector 2.0.7
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 |
|---|---|---|---|---|
| netease_cloudmusic_detector-2.0.7.tar.gz | 30.9 kB | Without provenance | Details for netease_cloudmusic_detector-2.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| netease_cloudmusic_detector-2.0.7-py3-none-any.whl | Python 3 | none | any | Details for netease_cloudmusic_detector-2.0.7-py3-none-any.whl |
Total release size: 50.3 kB
Release files / netease_cloudmusic_detector-2.0.7.tar.gz
| Download URL | netease_cloudmusic_detector-2.0.7.tar.gz |
|---|---|
| Size | 30.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6734fc42be069720a03b304fd3422b7e77f0608d9b87775d3e64eafd897003c4
|
|
BLAKE2b-256 checksum How to use checksums |
d119a1b66f8bccd26aaaf92e97f096bf7b46caff987dc83f2707f0b0f026220b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / netease_cloudmusic_detector-2.0.7-py3-none-any.whl
| Download URL | netease_cloudmusic_detector-2.0.7-py3-none-any.whl |
|---|---|
| Size | 19.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a180d872702f69461fef34e0e917920effa0db788feec11dea1a6d9024611b6
|
|
BLAKE2b-256 checksum How to use checksums |
cedd9f3a3faaf28e6625df4e43859ad30513d7b3fe1f56c0e41281a0acb18317
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for netease-cloudmusic-detector 2.0.7
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.