Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Binaryify committed Jun 10, 2020
1 parent 20cba0a commit 494a33c
Show file tree
Hide file tree
Showing 14 changed files with 905 additions and 19 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# 更新日志
### 3.33.0 | 2020.06.10
- 歌手榜支持地区参数 [#818](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/818)
- 新增视频分类列表,推荐视频,获取全部视频列表接口 [#816](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/816)
- 内置 apicache,修复不能在 NodeJS v13 版本使用的问题 [#817](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/817)

### 3.32.3 | 2020.06.07
- 修复 Nodejs 下 cookie 使用格式问题 [#812](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/812)

Expand Down
7 changes: 4 additions & 3 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
[sqaiyan/netmusic-node](https://github.com/sqaiyan/netmusic-node)

## 功能特性


1. 登录
2. 刷新登录
3. 发送验证码
Expand Down Expand Up @@ -115,7 +113,7 @@
92. 收藏的 MV 列表
93. 获取最新专辑
94. 听歌打卡
95. 获取视频标签下的视频
95. 获取视频标签/分类下的视频
96. 已收藏专辑列表
97. 获取动态评论
98. 歌单收藏者列表
Expand Down Expand Up @@ -171,6 +169,9 @@
148. 调整歌单顺序
149. 调整歌曲顺序
150. 独家放送列表
151. 获取推荐视频
152. 获取视频分类列表
153. 获取全部视频列表接口

## 环境要求

Expand Down
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const bodyParser = require('body-parser')
const request = require('./util/request')
const packageJSON = require('./package.json')
const exec = require('child_process').exec
const cache = require('apicache').middleware
const cache = require('./util/apicache').middleware

// version check
exec('npm info NeteaseCloudMusicApi version', (err, stdout, stderr) => {
Expand Down
48 changes: 44 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
92. 收藏的 MV 列表
93. 获取最新专辑
94. 听歌打卡
95. 获取视频标签下的视频
95. 获取视频标签/分类下的视频
96. 已收藏专辑列表
97. 获取动态评论
98. 歌单收藏者列表
Expand Down Expand Up @@ -166,6 +166,9 @@
148. 调整歌单顺序
149. 调整歌曲顺序
150. 独家放送列表
151. 获取推荐视频
152. 获取视频分类列表
153. 获取全部视频列表接口

## 安装

Expand Down Expand Up @@ -1967,15 +1970,44 @@ MV 点赞转发评论数数据

**调用例子 :** `/video/group/list`

### 获取视频标签下的视频
说明 : 调用此接口 , 传入`id`,可获取到相关的视频。 (ps:无法分页,每次请求返回内容都不一样,官方桌面软件是打开先请求两次,然后每次滚动到底部的时候再请求一次)
### 获取视频分类列表
说明 : 调用此接口 , 可获取视频分类列表

**必选参数 :** `id`: videoGroup 的 id
**接口地址 :** `/video/category/list`

**调用例子 :** `/video/category/list`

### 获取视频标签/分类下的视频
说明 : 调用此接口 , 传入标签/分类`id`,可获取到相关的视频,分页参数只能传入offset

**必选参数 :** `id`: videoGroup 的 id

**可选参数 :** `offset`: 默认0

**接口地址 :** `/video/group`

**调用例子 :** `/video/group?id=9104`

### 获取全部视频列表
说明 : 调用此接口,可获取视频分类列表,分页参数只能传入offset

**可选参数 :** `offset`: 默认0

**接口地址 :** `/video/timeline/all`

**调用例子 :** `/video/timeline/all`

### 获取推荐视频
说明 : 调用此接口, 可获取推荐视频,分页参数只能传入offset

**必选参数 :** `id`: videoGroup 的 id

**可选参数 :** `offset`: 默认0

**接口地址 :** `/video/group`

**调用例子 :** `/video/timeline/recommend`

### 相关视频

说明 : 调用此接口 , 可获取相关视频
Expand Down Expand Up @@ -2120,6 +2152,14 @@ MV 点赞转发评论数数据

说明 : 调用此接口 , 可获取排行榜中的歌手榜

**可选参数 :**
```
type : 地区
1: 华语
2: 欧美
3: 韩国
4: 日本
```
**接口地址 :** `/toplist/artist`

**调用例子 :** `/toplist/artist`
Expand Down
1 change: 0 additions & 1 deletion module/dj_program.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module.exports = (query, request) => {
offset: query.offset || 0,
asc: toBoolean(query.asc)
}
console.log(toBoolean(query.asc))
return request(
'POST',
`https://music.163.com/weapi/dj/program/byradio`,
Expand Down
1 change: 0 additions & 1 deletion module/song_order_update.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module.exports = (query, request) => {
op: 'update',
}

console.log(data)
return request(
'POST', `http://interface.music.163.com/api/playlist/manipulate/tracks`, data,
{
Expand Down
2 changes: 1 addition & 1 deletion module/toplist_artist.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module.exports = (query, request) => {
const data = {
type: 1,
type: query.type || 1,
limit: 100,
offset: 0,
total: true
Expand Down
18 changes: 18 additions & 0 deletions module/video_category_list.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = (query, request) => {
const data = {
offset: query.offset || 0,
total: 'true',
limit: query.limit || 99,
};
return request(
'POST',
`https://music.163.com/api/cloudvideo/category/list`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy
}
);
};

8 changes: 3 additions & 5 deletions module/video_group.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
// 视频链接

module.exports = (query, request) => {
const data = {
groupId: query.id,
offset: query.offset || 0,
needUrl: true,
resolution: query.res || 1080
need_preview_url: 'true',
total: true
}
return request(
'POST', `https://music.163.com/weapi/videotimeline/videogroup/get`, data, {
'POST', `https://music.163.com/api/videotimeline/videogroup/otherclient/get`, data, {
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy
Expand Down
17 changes: 17 additions & 0 deletions module/video_timeline_all.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = (query, request) => {
const data = {
groupId: 0,
offset: query.offset || 0,
need_preview_url: 'true',
total: true
}
console.log({data})
// /api/videotimeline/otherclient/get
return request(
'POST', `https://music.163.com/api/videotimeline/otherclient/get`, data, {
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy
}
)
}
20 changes: 20 additions & 0 deletions module/video_timeline_recommend.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = (query, request) => {
const data = {
offset: query.offset || 0,
filterLives: '[]',
withProgramInfo: 'true',
needUrl: '1',
resolution: '480'
};
return request(
'POST',
`https://music.163.com/api/videotimeline/get`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy
}
);
};

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "NeteaseCloudMusicApi",
"version": "3.32.3",
"version": "3.33.0",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",
Expand Down Expand Up @@ -35,7 +35,6 @@
"util"
],
"dependencies": {
"apicache": "^1.5.2",
"express": "^4.17.1",
"pac-proxy-agent": "^3.0.1",
"request": "^2.88.0"
Expand All @@ -49,4 +48,4 @@
"mocha": "^6.2.2",
"power-assert": "^1.6.1"
}
}
}
Loading

0 comments on commit 494a33c

Please sign in to comment.