mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-07-07 22:02:07 +08:00
feat: realIP option
This commit is contained in:
@ -5,7 +5,7 @@ module.exports = (query, request) => {
|
||||
query.t = {
|
||||
1: 'add',
|
||||
0: 'delete',
|
||||
2: 'reply'
|
||||
2: 'reply',
|
||||
}[query.t]
|
||||
query.type = {
|
||||
0: 'R_SO_4_', // 歌曲
|
||||
@ -14,25 +14,30 @@ module.exports = (query, request) => {
|
||||
3: 'R_AL_3_', // 专辑
|
||||
4: 'A_DJ_1_', // 电台,
|
||||
5: 'R_VI_62_', // 视频
|
||||
6: 'A_EV_2_' // 动态
|
||||
6: 'A_EV_2_', // 动态
|
||||
}[query.type]
|
||||
const data = {
|
||||
threadId: query.type + query.id
|
||||
threadId: query.type + query.id,
|
||||
}
|
||||
|
||||
if(query.type == 'A_EV_2_'){
|
||||
|
||||
if (query.type == 'A_EV_2_') {
|
||||
data.threadId = query.threadId
|
||||
}
|
||||
if(query.t == 'add')
|
||||
data.content = query.content
|
||||
else if(query.t == 'delete')
|
||||
data.commentId = query.commentId
|
||||
if (query.t == 'add') data.content = query.content
|
||||
else if (query.t == 'delete') data.commentId = query.commentId
|
||||
else if (query.t == 'reply') {
|
||||
data.commentId = query.commentId
|
||||
data.content = query.content
|
||||
}
|
||||
return request(
|
||||
'POST', `https://music.163.com/weapi/resource/comments/${query.t}`, data,
|
||||
{crypto: 'weapi', cookie: query.cookie, proxy: query.proxy}
|
||||
'POST',
|
||||
`https://music.163.com/weapi/resource/comments/${query.t}`,
|
||||
data,
|
||||
{
|
||||
crypto: 'weapi',
|
||||
cookie: query.cookie,
|
||||
proxy: query.proxy,
|
||||
realIP: query.realIP,
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user