Liu Song’s Projects


~/Projects/163-music-proxy

git clone https://code.lsong.org/163-music-proxy

Commit

Commit
31e95721a766058ef0d1307aea495039c3e9829d
Author
binaryify <[email protected]>
Date
2022-03-05 17:59:37 +0800 +0800
Diffstat
 CHANGELOG.MD | 7 +++++++
 README.MD | 4 ++++
 docs/README.md | 27 ++++++++++++++++++++++++---
 interface.d.ts | 2 ++
 module/artist_follow_count.js | 18 ++++++++++++++++++
 module/artist_new_mv.js | 2 +-
 module/artist_new_song.js | 2 +-
 module/cloud.js | 2 +-
 module/cloud_match.js | 2 +-
 module/comment_hug_list.js | 2 +-
 module/homepage_block_page.js | 2 +-
 module/homepage_dragon_ball.js | 2 +-
 module/hug_comment.js | 1 +
 module/like.js | 2 +-
 module/musician_tasks_new.js | 16 ++++++++++++++++
 module/send_album.js | 2 +-
 module/send_song.js | 2 +-
 module/user_comment_history.js | 1 +
 module/user_event.js | 2 +-
 package.json | 2 +-
 util/request.js | 2 +-

新增歌手粉丝数量接口 #1485 , 新增音乐人任务(新)接口, 更新 appver


diff --git a/CHANGELOG.MD b/CHANGELOG.MD
index 98f2b4bd0f7e3572923d42d3127465a867dd3566..4db799d2313198fca22cda5dcaf4fea15d3d7ca7 100644
--- a/CHANGELOG.MD
+++ b/CHANGELOG.MD
@@ -1,4 +1,11 @@
 # 更新日志
+### 4.5.7 | 2022.03.05
+- 新增歌手粉丝数量接口[#1485](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1485)
+
+- 新增音乐人任务(新)接口
+
+- 更新 `appver`
+
 ### 4.5.6 | 2022.02.12
 - 歌单封面上传接口缺失参数时返回状态码修正
 




diff --git a/README.MD b/README.MD
index 51bf5faed1859d91f73421d609007c46907030c0..7b0d9d191c687abbdf6fb1a719c70d4ab3e1f7e0 100644
--- a/README.MD
+++ b/README.MD
@@ -43,6 +43,7 @@ $ npm install
 ```
 
 ## 运行
+调用前务必阅读文档的`调用前须知`
 
 ```shell
 $ node app.js
@@ -357,7 +358,10 @@ 234. 最近播放-专辑
 235. 最近播放-播客
 236. 签到进度
 237. 重复昵称检测
+网易云音乐 Node.js API service
 
+<a href="https://www.npmjs.com/package/NeteaseCloudMusicApi"><img src="https://img.shields.io/npm/v/NeteaseCloudMusicApi.svg" alt="Version"></a>
+239. 音乐人任务(新)
 ## 更新日志
 
 [changelog](https://github.com/Binaryify/NeteaseCloudMusicApi/blob/master/CHANGELOG.MD)




diff --git a/docs/README.md b/docs/README.md
index 841ca9edfdbb6101f4a7cfcc4f4bf405ae7b2a65..e64fbd7cb89f746e97bb58160a10cd0173c92ddc 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -253,6 +253,8 @@ 234. 最近播放-专辑
 235. 最近播放-播客
 236. 签到进度
 237. 重复昵称检测
+238. 歌手粉丝数量
+239. 音乐人任务(新)
 
 
 ## 安装
@@ -3574,6 +3576,17 @@
 ### 歌手粉丝
 
 说明 : 调用此接口 , 传入歌手 id, 可获取歌手粉丝
+**必选参数 :** `id` : 歌手 id
+
+
+**接口地址 :** `/artist/fans`
+
+**调用例子 :** `/artist/fans?id=2116&limit=10&offset=0`
+
+### 歌手粉丝数量
+
+说明 : 调用此接口 , 传入歌手 id, 可获取歌手粉丝数量
+
 
 **必选参数 :** `id` : 歌手 id
 
@@ -3582,10 +3595,10 @@
 `offset`: 偏移数量 , 用于分页 , 如 :( 评论页数 -1)\*10, 其中 10 为 limit 的值
 
 # NeteaseCloudMusicApi
-**调用例子 :** `/mv/sub`
+**调用例子 :** `/playlist/create?name=测试歌单`,`/playlist/create?name=test&type=VIDEO`
 
 # NeteaseCloudMusicApi
-### 收藏的 MV 列表
+### 删除歌单
 
 ### 数字专辑详情
 
@@ -3630,11 +3643,19 @@
 ### 音乐人任务
 
 7. 获取用户歌单
-[darknessomi/musicbox](https://github.com/darknessomi/musicbox)
+82. 退出登录
 
 **接口地址 :** `/musician/tasks`
 
 **调用例子 :** `/musician/tasks`
+
+### 音乐人任务(新)
+
+说明 : 音乐人登录后调用此接口 , 可获取音乐人任务。返回的数据中`status`字段为任务状态,0 表示任务未开始,10 表示任务正在进行中,20 表示任务完成,但未领取云豆,100 表示任务完成,并且已经领取了相应的云豆
+
+**接口地址 :** `/musician/tasks/new`
+
+**调用例子 :** `/musician/tasks/new`
 
 ### 账号云豆数
 




diff --git a/interface.d.ts b/interface.d.ts
index 257b92656caff5a9f893047991a0751e6ce012ef..ce8b294831acb8edb325bd5d8fe6882859f54785 100644
--- a/interface.d.ts
+++ b/interface.d.ts
@@ -1607,3 +1607,5 @@   params: {
     nickname: string
   } & RequestBaseConfig,
 ): Promise<Response>
+
+export function musician_tasks_new(params: RequestBaseConfig): Promise<Response>




diff --git a/module/artist_follow_count.js b/module/artist_follow_count.js
new file mode 100644
index 0000000000000000000000000000000000000000..93afda21ba31e489141a5f669908791b8603dd37
--- /dev/null
+++ b/module/artist_follow_count.js
@@ -0,0 +1,18 @@
+// 歌手粉丝数量
+
+module.exports = (query, request) => {
+  const data = {
+    id: query.id,
+  }
+  return request(
+    'POST',
+    `https://music.163.com/weapi/artist/follow/count/get`,
+    data,
+    {
+      crypto: 'weapi',
+      cookie: query.cookie,
+      proxy: query.proxy,
+      realIP: query.realIP,
+    },
+  )
+}




diff --git a/module/artist_new_mv.js b/module/artist_new_mv.js
index 6c65343ef086443a9076dd19f3ace54b7aaa2d46..d385e358f0528660498ea0f27d4e256d52981850 100644
--- a/module/artist_new_mv.js
+++ b/module/artist_new_mv.js
@@ -1,6 +1,6 @@
 module.exports = (query, request) => {
   query.cookie.os = 'ios'
-  query.cookie.appver = '8.1.20'
+  query.cookie.appver = '8.7.01'
   const data = {
     limit: query.limit || 20,
     startTimestamp: query.before || Date.now(),




diff --git a/module/artist_new_song.js b/module/artist_new_song.js
index a367f8c46ce524e7a9e52d9e7ea52bb5441924b0..41fbde50de458b4885582064dc54b5adc25177f2 100644
--- a/module/artist_new_song.js
+++ b/module/artist_new_song.js
@@ -1,6 +1,6 @@
 module.exports = (query, request) => {
   query.cookie.os = 'ios'
-  query.cookie.appver = '8.1.20'
+  query.cookie.appver = '8.7.01'
   const data = {
     limit: query.limit || 20,
     startTimestamp: query.before || Date.now(),




diff --git a/module/cloud.js b/module/cloud.js
index b7cdac33158b82ffd9370732a1ee7dd27adda63f..49e91c613a63584f56936e64fe74c89dbb10c0ad 100644
--- a/module/cloud.js
+++ b/module/cloud.js
@@ -3,7 +3,7 @@ const uploadPlugin = require('../plugins/songUpload')
 const md5 = require('md5')
 module.exports = async (query, request) => {
   query.cookie.os = 'pc'
-  query.cookie.appver = '2.7.1.198277'
+  query.cookie.appver = '2.9.7'
   const bitrate = 999000
   if (!query.songFile) {
     return Promise.reject({




diff --git a/module/cloud_match.js b/module/cloud_match.js
index d28d88b8542db7e591c3f828ce4c65169c03f4cc..98fc8aa8302878310b386cc6ca12fc8b0210547e 100644
--- a/module/cloud_match.js
+++ b/module/cloud_match.js
@@ -1,6 +1,6 @@
 module.exports = (query, request) => {
   query.cookie.os = 'ios'
-  query.cookie.appver = '8.1.20'
+  query.cookie.appver = '8.7.01'
   const data = {
     userId: query.uid,
     songId: query.sid,




diff --git a/module/comment_hug_list.js b/module/comment_hug_list.js
index 394a2df4f00d21164793a032cfb04c8d989a134f..eaf535fe28480bb853b7f13d331997f3e32cb23e 100644
--- a/module/comment_hug_list.js
+++ b/module/comment_hug_list.js
@@ -1,7 +1,7 @@
 const { resourceTypeMap } = require('../util/config.json')
 module.exports = (query, request) => {
   query.cookie.os = 'ios'
-  query.cookie.appver = '8.1.20'
+  query.cookie.appver = '8.7.01'
   query.type = resourceTypeMap[query.type || 0]
   const threadId = query.type + query.sid
   const data = {




diff --git a/module/homepage_block_page.js b/module/homepage_block_page.js
index af4b0741f852fdfa0826fd7722a92900ea464384..f214a6d91c254fc3b3ea87a83a1a77f9415a4d60 100644
--- a/module/homepage_block_page.js
+++ b/module/homepage_block_page.js
@@ -3,7 +3,7 @@ // 这个接口为移动端接口,首页-发现页,数据结构可以参考 https://github.com/hcanyz/flutter-netease-music-api/blob/master/lib/src/api/uncategorized/bean.dart#L259 HomeBlockPageWrap
 // query.refresh 是否刷新数据
 module.exports = (query, request) => {
   query.cookie.os = 'ios'
-  query.cookie.appver = '8.1.20'
+  query.cookie.appver = '8.7.01'
   const data = { refresh: query.refresh || false, cursor: query.cursor }
   return request(
     'POST',




diff --git a/module/homepage_dragon_ball.js b/module/homepage_dragon_ball.js
index 00231dd516a39f51956c1b278148b46f3e3d585f..e2421bf9b92298f6e39e6b3bfe610642e2195dd5 100644
--- a/module/homepage_dragon_ball.js
+++ b/module/homepage_dragon_ball.js
@@ -8,7 +8,7 @@   if (!('MUSIC_U' in query.cookie))
     query.cookie.MUSIC_A = config.anonymous_token
   const data = {}
   query.cookie.os = 'ios'
-  query.cookie.appver = '8.1.20'
+  query.cookie.appver = '8.7.01'
   return request(
     'POST',
     `https://music.163.com/eapi/homepage/dragon/ball/static`,




diff --git a/module/hug_comment.js b/module/hug_comment.js
index ce4452883dfcc32439b31861e2979709f11e948c..fc88f138a6261330b106bc6360c397d19e4ce611 100644
--- a/module/hug_comment.js
+++ b/module/hug_comment.js
@@ -1,6 +1,7 @@
 const { resourceTypeMap } = require('../util/config.json')
 module.exports = (query, request) => {
   query.cookie.os = 'ios'
+module.exports = (query, request) => {
   query.cookie.appver = '8.1.20'
   query.type = resourceTypeMap[query.type || 0]
   const threadId = query.type + query.sid




diff --git a/module/like.js b/module/like.js
index bd9059183fc1c3ec7591276ea82dcde214dd4ec8..e13e78505afd3c71f21dea2d991a913a05d85fd3 100644
--- a/module/like.js
+++ b/module/like.js
@@ -2,7 +2,7 @@ // 红心与取消红心歌曲
 
 module.exports = (query, request) => {
   query.cookie.os = 'pc'
-  query.cookie.appver = '2.7.1.198277'
+  query.cookie.appver = '2.9.7'
   query.like = query.like == 'false' ? false : true
   const data = {
     alg: 'itembased',




diff --git a/module/musician_tasks_new.js b/module/musician_tasks_new.js
new file mode 100644
index 0000000000000000000000000000000000000000..fd4953ea949fc46f5d0463bd9e403fc1daba3ca5
--- /dev/null
+++ b/module/musician_tasks_new.js
@@ -0,0 +1,16 @@
+// 获取音乐人任务
+
+module.exports = (query, request) => {
+  const data = {}
+  return request(
+    'POST',
+    `https://music.163.com/api/nmusician/workbench/mission/stage/list `,
+    data,
+    {
+      crypto: 'weapi',
+      cookie: query.cookie,
+      proxy: query.proxy,
+      realIP: query.realIP,
+    },
+  )
+}




diff --git a/module/send_album.js b/module/send_album.js
index 8af56733c35a79d4026b87dce675e0476a5da312..d6693a5c1f1060b26c3334486088cbce70416293 100644
--- a/module/send_album.js
+++ b/module/send_album.js
@@ -2,7 +2,7 @@ // 私信专辑
 
 module.exports = (query, request) => {
   query.cookie.os = 'ios'
-  query.cookie.appver = '8.1.20'
+  query.cookie.appver = '8.7.01'
   const data = {
     id: query.id,
     msg: query.msg || '',




diff --git a/module/send_song.js b/module/send_song.js
index 932cde14d3bef4c8afd8cfd8ffc984effe43b613..b2ce0a27ac7a9a8cfc349be9d48ed70bb1e129db 100644
--- a/module/send_song.js
+++ b/module/send_song.js
@@ -2,7 +2,7 @@ // 私信歌曲
 
 module.exports = (query, request) => {
   query.cookie.os = 'ios'
-  query.cookie.appver = '8.1.20'
+  query.cookie.appver = '8.7.01'
   const data = {
     id: query.id,
     msg: query.msg || '',




diff --git a/module/user_comment_history.js b/module/user_comment_history.js
index bb982214b842b2ef5085fbf43b7ee9949f602e49..339be309e0c232d0fe223a13aea6b99cfc0bdbb9 100644
--- a/module/user_comment_history.js
+++ b/module/user_comment_history.js
@@ -1,5 +1,6 @@
 module.exports = (query, request) => {
   query.cookie.os = 'ios'
+  query.cookie.os = 'ios'
   query.cookie.appver = '8.1.20'
   const data = {
     compose_reminder: 'true',




diff --git a/module/user_event.js b/module/user_event.js
index 0c642aedb007e87c33be4712bf835324a7414f88..521b0dd0d71a1c040bbebc1d8bb150a95381646d 100644
--- a/module/user_event.js
+++ b/module/user_event.js
@@ -2,7 +2,7 @@ // 用户动态
 
 module.exports = (query, request) => {
   query.cookie.os = 'ios'
-  query.cookie.appver = '8.1.20'
+  query.cookie.appver = '8.7.01'
   const data = {
     getcounts: true,
     time: query.lasttime || -1,




diff --git a/package.json b/package.json
index 4ca28dc7086790379edeb7f69dcc9b4b9540bbf4..15d0793f91608c62869ba0cb6519f46513ac188a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "NeteaseCloudMusicApi",
-  "version": "4.5.7",
+  "version": "4.5.8",
   "description": "网易云音乐 NodeJS 版 API",
   "scripts": {
     "start": "node app.js",




diff --git a/util/request.js b/util/request.js
index bcb245a58a7cc4a4848388c935fc5bc6a6acaab8..d449d27d3ffb74ecba647bd75eb3328917312ec5 100644
--- a/util/request.js
+++ b/util/request.js
@@ -85,7 +85,7 @@       const csrfToken = cookie['__csrf'] || ''
       const header = {
         osver: cookie.osver, //系统版本
         deviceId: cookie.deviceId, //encrypt.base64.encode(imei + '\t02:00:00:00:00:00\t5106025eb79a5247\t70ffbaac7')
-        appver: cookie.appver || '8.0.0', // app版本
+        appver: cookie.appver || '8.7.01', // app版本
         versioncode: cookie.versioncode || '140', //版本号
         mobilename: cookie.mobilename, //设备model
         buildver: cookie.buildver || Date.now().toString().substr(0, 10),