diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 8fadf28..9280521 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,4 +1,9 @@ # 更新日志 +### 4.8.2 | 2022.09.13 +- 修复 song/url 接口提示网络拥堵的问题 + +- 单元测试修复 + ### 4.8.1 | 2022.09.12 - 解决网络拥堵提示问题 diff --git a/module/song_url.js b/module/song_url.js index 46e6bf1..ad90429 100644 --- a/module/song_url.js +++ b/module/song_url.js @@ -2,8 +2,8 @@ const crypto = require('crypto') module.exports = (query, request) => { - if (!('MUSIC_U' in query.cookie)) - query.cookie._ntes_nuid = crypto.randomBytes(16).toString('hex') + // if (!('MUSIC_U' in query.cookie)) + // query.cookie._ntes_nuid = crypto.randomBytes(16).toString('hex') query.cookie.os = 'pc' const data = { ids: '[' + query.id + ']', diff --git a/package.json b/package.json index ee672bb..b95095b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NeteaseCloudMusicApi", - "version": "4.8.1", + "version": "4.8.2", "description": "网易云音乐 NodeJS 版 API", "scripts": { "start": "node app.js", diff --git a/test/album.test.js b/test/album.test.js index 1aa15f2..25d7d3b 100644 --- a/test/album.test.js +++ b/test/album.test.js @@ -6,6 +6,7 @@ describe('测试获取歌手专辑列表是否正常', () => { it('数据的 code 应该为200', (done) => { const qs = { id: 32311, + realIP: '116.25.146.177', } axios diff --git a/test/comment.test.js b/test/comment.test.js index a578373..5aa0fbc 100644 --- a/test/comment.test.js +++ b/test/comment.test.js @@ -6,6 +6,7 @@ describe('测试获取评论是否正常', () => { it('数据的 code 应该为200', (done) => { const qs = { id: 32311, + realIP: '116.25.146.177', } axios diff --git a/test/lyric.test.js b/test/lyric.test.js index b9a1352..b185ab5 100644 --- a/test/lyric.test.js +++ b/test/lyric.test.js @@ -6,6 +6,7 @@ describe('测试获取歌词是否正常', () => { it('数据应该有 lrc 字段', (done) => { const qs = { id: 347230, + realIP: '116.25.146.177', } axios diff --git a/test/search.test.js b/test/search.test.js index 3923f91..73d6237 100644 --- a/test/search.test.js +++ b/test/search.test.js @@ -7,6 +7,7 @@ describe('测试搜索是否正常', () => { const qs = { keywords: '海阔天空', type: 1, + realIP: '116.25.146.177', } axios .get(`${host}/search`, {