mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08:00
添加抱一抱接口
This commit is contained in:
parent
00b63cfa7a
commit
99ec5bf065
34
module/comment_hug_list.js
Normal file
34
module/comment_hug_list.js
Normal file
@ -0,0 +1,34 @@
|
||||
module.exports = (query, request) => {
|
||||
query.cookie.os = 'ios'
|
||||
query.cookie.appver = '7.3.27'
|
||||
query.type = {
|
||||
0: 'R_SO_4_', // 歌曲
|
||||
1: 'R_MV_5_', // MV
|
||||
2: 'A_PL_0_', // 歌单
|
||||
3: 'R_AL_3_', // 专辑
|
||||
4: 'A_DJ_1_', // 电台,
|
||||
5: 'R_VI_62_', // 视频
|
||||
6: 'A_EV_2_', // 动态
|
||||
}[query.type]
|
||||
const threadId = query.type + query.id
|
||||
const data = {
|
||||
targetUserId: query.uid,
|
||||
commentId: query.cid,
|
||||
cursor: '-1',
|
||||
threadId: threadId,
|
||||
pageNo: 1,
|
||||
idCursor: -1,
|
||||
pageSize: 100,
|
||||
}
|
||||
return request(
|
||||
'POST',
|
||||
`https://music.163.com/api/v2/resource/comments/hug/list`,
|
||||
data,
|
||||
{
|
||||
crypto: 'api',
|
||||
cookie: query.cookie,
|
||||
proxy: query.proxy,
|
||||
realIP: query.realIP,
|
||||
},
|
||||
)
|
||||
}
|
30
module/hug_comment.js
Normal file
30
module/hug_comment.js
Normal file
@ -0,0 +1,30 @@
|
||||
module.exports = (query, request) => {
|
||||
query.cookie.os = 'ios'
|
||||
query.cookie.appver = '7.3.27'
|
||||
query.type = {
|
||||
0: 'R_SO_4_', // 歌曲
|
||||
1: 'R_MV_5_', // MV
|
||||
2: 'A_PL_0_', // 歌单
|
||||
3: 'R_AL_3_', // 专辑
|
||||
4: 'A_DJ_1_', // 电台,
|
||||
5: 'R_VI_62_', // 视频
|
||||
6: 'A_EV_2_', // 动态
|
||||
}[query.type]
|
||||
const threadId = query.type + query.id
|
||||
const data = {
|
||||
targetUserId: query.uid,
|
||||
commentId: query.cid,
|
||||
threadId: threadId,
|
||||
}
|
||||
return request(
|
||||
'POST',
|
||||
`https://music.163.com/api/v2/resource/comments/hug/listener`,
|
||||
data,
|
||||
{
|
||||
crypto: 'api',
|
||||
cookie: query.cookie,
|
||||
proxy: query.proxy,
|
||||
realIP: query.realIP,
|
||||
},
|
||||
)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user