mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2025-10-23 15:43:10 +00:00
修复 song/url 接口提示网络拥堵的问题,单元测试修复
This commit is contained in:
parent
4977423e3a
commit
88056db7bd
@ -1,4 +1,9 @@
|
|||||||
# 更新日志
|
# 更新日志
|
||||||
|
### 4.8.2 | 2022.09.13
|
||||||
|
- 修复 song/url 接口提示网络拥堵的问题
|
||||||
|
|
||||||
|
- 单元测试修复
|
||||||
|
|
||||||
### 4.8.1 | 2022.09.12
|
### 4.8.1 | 2022.09.12
|
||||||
- 解决网络拥堵提示问题
|
- 解决网络拥堵提示问题
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
const crypto = require('crypto')
|
const crypto = require('crypto')
|
||||||
module.exports = (query, request) => {
|
module.exports = (query, request) => {
|
||||||
if (!('MUSIC_U' in query.cookie))
|
// if (!('MUSIC_U' in query.cookie))
|
||||||
query.cookie._ntes_nuid = crypto.randomBytes(16).toString('hex')
|
// query.cookie._ntes_nuid = crypto.randomBytes(16).toString('hex')
|
||||||
query.cookie.os = 'pc'
|
query.cookie.os = 'pc'
|
||||||
const data = {
|
const data = {
|
||||||
ids: '[' + query.id + ']',
|
ids: '[' + query.id + ']',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "NeteaseCloudMusicApi",
|
"name": "NeteaseCloudMusicApi",
|
||||||
"version": "4.8.1",
|
"version": "4.8.2",
|
||||||
"description": "网易云音乐 NodeJS 版 API",
|
"description": "网易云音乐 NodeJS 版 API",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node app.js",
|
"start": "node app.js",
|
||||||
|
@ -6,6 +6,7 @@ describe('测试获取歌手专辑列表是否正常', () => {
|
|||||||
it('数据的 code 应该为200', (done) => {
|
it('数据的 code 应该为200', (done) => {
|
||||||
const qs = {
|
const qs = {
|
||||||
id: 32311,
|
id: 32311,
|
||||||
|
realIP: '116.25.146.177',
|
||||||
}
|
}
|
||||||
|
|
||||||
axios
|
axios
|
||||||
|
@ -6,6 +6,7 @@ describe('测试获取评论是否正常', () => {
|
|||||||
it('数据的 code 应该为200', (done) => {
|
it('数据的 code 应该为200', (done) => {
|
||||||
const qs = {
|
const qs = {
|
||||||
id: 32311,
|
id: 32311,
|
||||||
|
realIP: '116.25.146.177',
|
||||||
}
|
}
|
||||||
|
|
||||||
axios
|
axios
|
||||||
|
@ -6,6 +6,7 @@ describe('测试获取歌词是否正常', () => {
|
|||||||
it('数据应该有 lrc 字段', (done) => {
|
it('数据应该有 lrc 字段', (done) => {
|
||||||
const qs = {
|
const qs = {
|
||||||
id: 347230,
|
id: 347230,
|
||||||
|
realIP: '116.25.146.177',
|
||||||
}
|
}
|
||||||
|
|
||||||
axios
|
axios
|
||||||
|
@ -7,6 +7,7 @@ describe('测试搜索是否正常', () => {
|
|||||||
const qs = {
|
const qs = {
|
||||||
keywords: '海阔天空',
|
keywords: '海阔天空',
|
||||||
type: 1,
|
type: 1,
|
||||||
|
realIP: '116.25.146.177',
|
||||||
}
|
}
|
||||||
axios
|
axios
|
||||||
.get(`${host}/search`, {
|
.get(`${host}/search`, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user