Skip to content

Commit

Permalink
fix: 修复匿名登录下,部分接口提示网络太拥挤问题 Binaryify#1829
Browse files Browse the repository at this point in the history
  • Loading branch information
Binaryify authored and Jerry-FaGe committed Dec 28, 2023
1 parent fbf07e2 commit 2c1bf1c
Show file tree
Hide file tree
Showing 17 changed files with 20 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# 更新日志
### 4.13.6 | 2023.10.26
- 修复匿名登录下,部分接口提示网络太拥挤问题 #1829

### 4.13.5 | 2023.10.22
- Dockfile 更新,移除 linux/s390x 平台,防止构建失败

Expand Down
2 changes: 1 addition & 1 deletion module/artist_new_mv.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = (query, request) => {
query.cookie.os = 'ios'
query.cookie.appver = '8.7.01'
query.cookie.appver = '8.10.90'
const data = {
limit: query.limit || 20,
startTimestamp: query.before || Date.now(),
Expand Down
2 changes: 1 addition & 1 deletion module/artist_new_song.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = (query, request) => {
query.cookie.os = 'ios'
query.cookie.appver = '8.7.01'
query.cookie.appver = '8.10.90'
const data = {
limit: query.limit || 20,
startTimestamp: query.before || Date.now(),
Expand Down
2 changes: 1 addition & 1 deletion module/cloud_match.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = (query, request) => {
query.cookie.os = 'ios'
query.cookie.appver = '8.7.01'
query.cookie.appver = '8.10.90'
const data = {
userId: query.uid,
songId: query.sid,
Expand Down
2 changes: 1 addition & 1 deletion module/comment_hug_list.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { resourceTypeMap } = require('../util/config.json')
module.exports = (query, request) => {
query.cookie.os = 'ios'
query.cookie.appver = '8.7.01'
query.cookie.appver = '8.10.90'
query.type = resourceTypeMap[query.type || 0]
const threadId = query.type + query.sid
const data = {
Expand Down
2 changes: 1 addition & 1 deletion module/homepage_block_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// query.refresh 是否刷新数据
module.exports = (query, request) => {
query.cookie.os = 'ios'
query.cookie.appver = '8.7.01'
query.cookie.appver = '8.10.90'
const data = { refresh: query.refresh || false, cursor: query.cursor }
return request(
'POST',
Expand Down
2 changes: 1 addition & 1 deletion module/homepage_dragon_ball.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
module.exports = (query, request) => {
const data = {}
query.cookie.os = 'ios'
query.cookie.appver = '8.7.01'
query.cookie.appver = '8.10.90'
return request(
'POST',
`https://music.163.com/eapi/homepage/dragon/ball/static`,
Expand Down
2 changes: 1 addition & 1 deletion module/hug_comment.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { resourceTypeMap } = require('../util/config.json')
module.exports = (query, request) => {
query.cookie.os = 'ios'
query.cookie.appver = '8.7.01'
query.cookie.appver = '8.10.90'
query.type = resourceTypeMap[query.type || 0]
const threadId = query.type + query.sid
const data = {
Expand Down
2 changes: 1 addition & 1 deletion module/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const crypto = require('crypto')

module.exports = async (query, request) => {
query.cookie.os = 'ios'
query.cookie.appver = '8.7.01'
query.cookie.appver = '8.10.90'
const data = {
username: query.email,
password:
Expand Down
2 changes: 1 addition & 1 deletion module/login_cellphone.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const crypto = require('crypto')

module.exports = async (query, request) => {
query.cookie.os = 'ios'
query.cookie.appver = '8.7.01'
query.cookie.appver = '8.10.90'
const data = {
phone: query.phone,
countrycode: query.countrycode || '86',
Expand Down
2 changes: 1 addition & 1 deletion module/send_album.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module.exports = (query, request) => {
query.cookie.os = 'ios'
query.cookie.appver = '8.7.01'
query.cookie.appver = '8.10.90'
const data = {
id: query.id,
msg: query.msg || '',
Expand Down
2 changes: 1 addition & 1 deletion module/send_song.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module.exports = (query, request) => {
query.cookie.os = 'ios'
query.cookie.appver = '8.7.01'
query.cookie.appver = '8.10.90'
const data = {
id: query.id,
msg: query.msg || '',
Expand Down
2 changes: 1 addition & 1 deletion module/user_comment_history.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = (query, request) => {
query.cookie.os = 'ios'
query.cookie.appver = '8.7.01'
query.cookie.appver = '8.10.90'
const data = {
compose_reminder: 'true',
compose_hot_comment: 'true',
Expand Down
2 changes: 1 addition & 1 deletion module/user_event.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module.exports = (query, request) => {
query.cookie.os = 'ios'
query.cookie.appver = '8.7.01'
query.cookie.appver = '8.10.90'
const data = {
getcounts: true,
time: query.lasttime || -1,
Expand Down
2 changes: 1 addition & 1 deletion module/user_update.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module.exports = (query, request) => {
query.cookie.os = 'ios'
query.cookie.appver = '8.7.01'
query.cookie.appver = '8.10.90'
const data = {
// avatarImgId: '0',
birthday: query.birthday,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "NeteaseCloudMusicApi",
"version": "4.13.5",
"version": "4.13.6",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",
Expand Down
2 changes: 2 additions & 0 deletions util/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ const createRequest = (method, url, data = {}, options) => {
// 游客
if (!options.cookie.MUSIC_A) {
options.cookie.MUSIC_A = anonymous_token
options.cookie.os = options.cookie.os || 'ios'
options.cookie.appver = options.cookie.appver || '8.10.90'
}
}
headers['Cookie'] = Object.keys(options.cookie)
Expand Down

0 comments on commit 2c1bf1c

Please sign in to comment.