Files

319 lines
7.1 KiB
Markdown
Raw Permalink Normal View History

2025-08-25 01:30:19 +08:00
# 网易云音乐无损解析
2025-08-25 01:23:41 +08:00
2025-08-25 01:30:19 +08:00
<div align="center">
![GitHub stars](https://img.shields.io/github/stars/Suxiaoqinx/Netease_url?style=flat-square)
![GitHub forks](https://img.shields.io/github/forks/Suxiaoqinx/Netease_url?style=flat-square)
![GitHub issues](https://img.shields.io/github/issues/Suxiaoqinx/Netease_url?style=flat-square)
![GitHub license](https://img.shields.io/github/license/Suxiaoqinx/Netease_url?style=flat-square)
**功能强大的网易云音乐解析工具**
支持歌曲搜索 | 单曲解析 | 歌单解析 | 专辑解析 | 音乐下载
2025-10-17 02:05:44 +08:00
[在线体验](https://wyapi.toubiec.cn) • [使用文档](./使用文档.md) • [问题反馈](https://github.com/Suxiaoqinx/Netease_url/issues)
2025-08-25 01:30:19 +08:00
</div>
---
2026-09-25 23:17:26 +08:00
## 授权说明 / License
2026-01-02 11:37:13 +08:00
2026-09-25 23:17:26 +08:00
本仓库中的源代码基于 **MIT License** 开源,任何人可按 MIT 条款使用、修改和分发本仓库代码。
2026-01-02 11:37:13 +08:00
2026-09-25 23:17:26 +08:00
⚠️ 注意:
线上体验版本(Online Demo / 官网体验页)是作者另行独立开发的闭源产品,
不属于本仓库 MIT 代码的一部分。
线上版本的权利声明以对应产品页面为准(可能标注 All rights reserved)。
简单说:
- 本仓库代码 → MIT
- 线上体验站 → 闭源,独立作品
2025-08-25 01:23:41 +08:00
2025-08-25 01:30:19 +08:00
## ✨ 功能特性
2025-08-25 01:23:41 +08:00
2025-08-25 01:30:19 +08:00
### 🎵 核心功能
- **🔍 歌曲搜索**:支持关键词搜索网易云音乐库中的歌曲
- **🎧 单曲解析**:解析单首歌曲的详细信息和下载链接
- **📋 歌单解析**:批量解析歌单中的所有歌曲信息
- **💿 专辑解析**:批量解析专辑中的所有歌曲信息
- **⬇️ 音乐下载**:支持多种音质的音乐文件下载
2025-08-25 01:23:41 +08:00
2025-08-25 01:30:19 +08:00
### 🎼 音质支持
- `standard`:标准音质 (128kbps)
- `exhigh`:极高音质 (320kbps)
- `lossless`:无损音质 (FLAC)
- `hires`:Hi-Res音质 (24bit/96kHz)
- `jyeffect`:高清环绕声
- `sky`:沉浸环绕声
- `jymaster`:超清母带
### 🌐 使用方式
- **Web界面**:直观友好的网页操作界面
- **RESTful API**:完整的API接口支持
- **批量处理**:支持歌单和专辑的批量解析
- **多格式支持**:支持ID和链接多种输入格式
2025-08-25 01:23:41 +08:00
---
2025-08-25 01:30:19 +08:00
## 🚀 快速开始
2025-08-25 01:23:41 +08:00
2025-08-25 01:30:19 +08:00
### 环境要求
- Python 3.7+
- 网易云音乐黑胶会员账号
2025-08-25 01:23:41 +08:00
2025-08-25 01:30:19 +08:00
### 安装步骤
#### 1. 克隆项目
```bash
git clone https://github.com/Suxiaoqinx/Netease_url.git
cd Netease_url
```
#### 2. 安装依赖
2025-08-25 01:23:41 +08:00
```bash
pip install -r requirements.txt
```
2025-08-25 01:30:19 +08:00
#### 3. 配置Cookie
在 `cookie.txt` 文件中填入黑胶会员账号的Cookie:
2025-08-25 01:23:41 +08:00
2025-08-25 01:30:19 +08:00
> 💡 **获取Cookie方法**:登录网易云音乐网页版 → F12开发者工具 → Network标签页 → 复制任意请求的Cookie值
2025-08-25 01:23:41 +08:00
2026-08-12 00:08:56 +08:00
> 杜比全景声音质需要设备支持,不同的设备可能会返回不同码率的 url cookie 需要传入os=pc保证返回正常码率的 url
2025-08-25 01:30:19 +08:00
#### 4. 启动服务
2025-08-25 01:23:41 +08:00
```bash
2025-08-25 01:30:19 +08:00
python main.py
2025-08-25 01:23:41 +08:00
```
2025-08-25 01:30:19 +08:00
#### 5. 访问界面
打开浏览器访问:`http://localhost:5000`
### 🐳 Docker部署
```bash
# 使用Docker Compose
docker-compose up -d
# 或使用Docker
docker build -t netease-music-api .
docker run -d -p 5000:5000 netease-music-api
```
2025-08-25 01:23:41 +08:00
---
2025-08-25 01:30:19 +08:00
## 📖 使用指南
2025-08-25 01:23:41 +08:00
2025-08-25 01:30:19 +08:00
### Web界面使用
2025-08-25 01:23:41 +08:00
2025-08-25 01:30:19 +08:00
#### 🔍 歌曲搜索
1. 选择功能:**歌曲搜索**
2. 输入关键词(歌曲名、歌手名等)
3. 点击**搜索**按钮
4. 在搜索结果中点击**解析**或**下载**按钮
2025-08-25 01:23:41 +08:00
2025-08-25 01:30:19 +08:00
#### 🎧 单曲解析
1. 选择功能:**单曲解析**
2. 输入歌曲ID或网易云音乐链接
- 支持格式:`1234567890` 或 `https://music.163.com/song?id=1234567890`
3. 点击**解析**按钮查看歌曲信息
2025-08-25 01:23:41 +08:00
2025-08-25 01:30:19 +08:00
#### 📋 歌单解析
1. 选择功能:**歌单解析**
2. 输入歌单ID或网易云音乐歌单链接
- 支持格式:`1234567890` 或 `https://music.163.com/playlist?id=1234567890`
3. 点击**解析**按钮查看歌单中所有歌曲
4. 点击单首歌曲的**解析**或**下载**按钮
2025-08-25 01:23:41 +08:00
2025-08-25 01:30:19 +08:00
#### 💿 专辑解析
1. 选择功能:**专辑解析**
2. 输入专辑ID或网易云音乐专辑链接
- 支持格式:`1234567890` 或 `https://music.163.com/album?id=1234567890`
3. 点击**解析**按钮查看专辑中所有歌曲
4. 点击单首歌曲的**解析**或**下载**按钮
#### ⬇️ 音乐下载
1. 选择功能:**音乐下载**
2. 输入歌曲ID或链接
3. 选择音质(标准/极高/无损/Hi-Res等)
4. 点击**下载**按钮
### 支持的链接格式
```
# 歌曲链接
https://music.163.com/song?id=1234567890
https://music.163.com/#/song?id=1234567890
# 歌单链接
https://music.163.com/playlist?id=1234567890
https://music.163.com/#/playlist?id=1234567890
# 专辑链接
https://music.163.com/album?id=1234567890
https://music.163.com/#/album?id=1234567890
# 直接使用ID
1234567890
```
## 🔌 API接口文档
### 基础信息
- **Base URL**: `http://localhost:5000`
- **请求方式**: GET / POST
- **响应格式**: JSON
### 接口列表
#### 1. 健康检查
```http
GET /health
```
**响应示例**:
```json
{
"status": "ok",
"message": "Service is running"
}
```
#### 2. 歌曲搜索
```http
POST /search
Content-Type: application/json
{
"keywords": "周杰伦 稻香",
"limit": 10
}
```
**响应示例**:
```json
{
"code": 200,
"result": {
"songs": [
{
"id": 185668,
"name": "稻香",
"artists": ["周杰伦"],
"album": "魔杰座",
"duration": 223000
}
]
}
}
```
#### 3. 单曲解析
```http
POST /song
Content-Type: application/json
{
"id": "185668"
}
```
#### 4. 歌单解析
```http
POST /playlist
Content-Type: application/json
{
"id": "123456789"
}
```
#### 5. 专辑解析
```http
POST /album
Content-Type: application/json
{
"id": "123456789"
}
```
#### 6. 音乐下载
```http
POST /download
Content-Type: application/json
{
"id": "185668",
"quality": "lossless"
}
```
**响应**: 直接返回音频文件流
2025-08-25 01:23:41 +08:00
---
## 音质参数说明(仅限单曲解析)
- `standard`:标准音质
- `exhigh`:极高音质
- `lossless`:无损音质
- `hires`:Hi-Res音质
- `jyeffect`:高清环绕声
- `sky`:沉浸环绕声
- `jymaster`:超清母带
> 黑胶VIP音质:standard, exhigh, lossless, hires, jyeffect
> 黑胶SVIP音质:sky, jymaster
---
## Docker 一键部署
1. **修改参数**
- 如需修改端口,请编辑 `.env` 或 `docker-compose.yml` 文件中的 `ports` 配置,例如:
```yaml
ports:
- "8080:5000"
```
2. **启动服务**
```bash
docker-compose up -d
```
---
## 在线演示
2025-09-22 14:33:59 +08:00
[在线解析](https://wyapi.toubiec.cn/)
2025-08-25 01:23:41 +08:00
---
## 注意事项
- 必须使用黑胶会员账号的 Cookie 才能解析高音质资源。
- Cookie 格式请严格按照 `cookie.txt` 示例填写。
---
## 致谢
- [Ravizhan](https://github.com/ravizhan)
---
## 反馈与交流
- 在 Github [Issues](https://github.com/Suxiaoqinx/Netease_url/issues) 提交反馈
- 或访问 [我的博客](https://www.toubiec.cn)
---
2025-08-25 01:26:10 +08:00
欢迎 Star、Fork 和 PR!
2025-08-25 01:31:17 +08:00
2025-10-17 02:05:44 +08:00
2026-01-02 11:37:13 +08:00