feat: realIP option

This commit is contained in:
a632079
2020-08-05 02:07:37 +08:00
parent 31d7e3941e
commit 9bd30a0ffb
178 changed files with 1734 additions and 906 deletions

View File

@ -2,7 +2,7 @@
module.exports = (query, request) => {
query.cookie.os = 'pc'
query.t = (query.t == 1 ? 'like' : 'unlike')
query.t = query.t == 1 ? 'like' : 'unlike'
query.type = {
0: 'R_SO_4_', // 歌曲
1: 'R_MV_5_', // MV
@ -10,17 +10,24 @@ 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,
commentId: query.cid
commentId: query.cid,
}
if(query.type == 'A_EV_2_'){
if (query.type == 'A_EV_2_') {
data.threadId = query.threadId
}
return request(
'POST', `https://music.163.com/weapi/v1/comment/${query.t}`, data,
{crypto: 'weapi', cookie: query.cookie, proxy: query.proxy}
'POST',
`https://music.163.com/weapi/v1/comment/${query.t}`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
}
)
}
}