解决网络拥堵提示问题

This commit is contained in:
binaryify 2022-09-12 16:58:07 +08:00
parent feaf083dfe
commit b4f6ba0884
10 changed files with 12 additions and 13 deletions

View File

@ -1,4 +1,7 @@
# 更新日志
### 4.8.0 | 2022.09.12
- 解决网络拥堵提示问题
### 4.7.0 | 2022.09.02
- 新增 API: 新版音乐链接获取 [#1583]

2
app.js
View File

@ -1,8 +1,6 @@
#!/usr/bin/env node
const generateConfig = require('./generateConfig')
async function start() {
// 如果需要手动修改anonymous_token需要注释generateConfig调用
await generateConfig()
require('./server').serveNcmApi({
checkVersion: true,
})

View File

@ -1,2 +0,0 @@
const generateConfig = require('./generateConfig')
generateConfig()

View File

@ -1,10 +1,10 @@
{
"name": "NeteaseCloudMusicApi",
"version": "4.7.0",
"version": "4.8.0",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",
"test": "node beforeTest.js && mocha -r intelli-espower-loader -t 30000 server.test.js main.test.js --exit",
"test": "mocha -r intelli-espower-loader -t 30000 server.test.js main.test.js --exit",
"lint": "eslint \"**/*.{js,ts}\"",
"lint-fix": "eslint --fix \"**/*.{js,ts}\"",
"prepare": "husky install",

View File

@ -6,7 +6,7 @@ describe('测试获取歌手专辑列表是否正常', () => {
it('数据的 code 应该为200', (done) => {
const qs = {
id: 32311,
cookie: config.anonymous_token,
cookie: '__remember_me=true; NMTID=xxx',
}
axios

View File

@ -6,7 +6,7 @@ describe('测试获取评论是否正常', () => {
it('数据的 code 应该为200', (done) => {
const qs = {
id: 32311,
cookie: config.anonymous_token,
cookie: '__remember_me=true; NMTID=xxx',
}
axios

View File

@ -6,7 +6,7 @@ describe('测试获取歌词是否正常', () => {
it('数据应该有 lrc 字段', (done) => {
const qs = {
id: 347230,
cookie: config.anonymous_token,
cookie: '__remember_me=true; NMTID=xxx',
}
axios

View File

@ -8,7 +8,7 @@ describe('测试获取歌曲是否正常', () => {
id: 462791935,
br: 999000,
realIP: '116.25.146.177',
cookie: config.anonymous_token,
cookie: '__remember_me=true; NMTID=xxx',
}
axios

View File

@ -7,7 +7,7 @@ describe('测试搜索是否正常', () => {
const qs = {
keywords: '海阔天空',
type: 1,
cookie: config.anonymous_token,
cookie: '__remember_me=true; NMTID=xxx',
}
axios
.get(`${host}/search`, {

View File

@ -1,5 +1,5 @@
{
"anonymous_token": "",
"anonymous_token": "bf8bfeabb1aa84f9c8c3906c04a04fb864322804c83f5d607e91a04eae463c9436bd1a17ec353cf780b396507a3f7464e8a60f4bbc019437993166e004087dd32d1490298caf655c2353e58daa0bc13cc7d5c198250968580b12c1b8817e3f5c807e650dd04abd3fb8130b7ae43fcc5b",
"resourceTypeMap": {
"0": "R_SO_4_",
"1": "R_MV_5_",
@ -10,4 +10,4 @@
"6": "A_EV_2_",
"7": "A_DR_14_"
}
}
}