Skip to main content

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

Release files for netease-cloudmusic-detector 2.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netease-cloudmusic-detector 2.0.6
File Size Uploaded
netease_cloudmusic_detector-2.0.6.tar.gz 26.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for netease-cloudmusic-detector 2.0.6
File Interpreter ABI Platform
netease_cloudmusic_detector-2.0.6-py3-none-any.whl Python 3 none any Details

Total release size:42.9 kB

Release files / netease_cloudmusic_detector-2.0.6.tar.gz

Download URL netease_cloudmusic_detector-2.0.6.tar.gz
Size 26.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2725853d14500ad811e006a09f002f39d5b60e80101e7da5cf7a398f1b9b95cd
BLAKE2b-256 checksum
How to use checksums
5ffbc53f09f5af762e59147704b6caf3069355fc0db5eaef76d403a5711b243b
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.6-py3-none-any.whl

Download URL netease_cloudmusic_detector-2.0.6-py3-none-any.whl
Size 16.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71e96c4072750f9a521637caea25cc167ed6a80f35bd68dda0c21c9e7a16a9df
BLAKE2b-256 checksum
How to use checksums
ed35208c33adc9d85c92802afb505dc6a5002c673ba7437b6b969d0f6d4e7f4f
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 history Release notifications | RSS feed

This release

2.0.6 This release

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page