mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
fix: add netease_api
This commit is contained in:
parent
fc0367c9b4
commit
0b701d23da
304 changed files with 27205 additions and 1 deletions
31
netease_api/module/comment_new.js
Normal file
31
netease_api/module/comment_new.js
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
const { resourceTypeMap } = require('../util/config.json')
|
||||
// 评论
|
||||
|
||||
module.exports = (query, request) => {
|
||||
query.cookie.os = 'pc'
|
||||
query.type = resourceTypeMap[query.type]
|
||||
const threadId = query.type + query.id
|
||||
const pageSize = query.pageSize || 20
|
||||
const pageNo = query.pageNo || 1
|
||||
const data = {
|
||||
threadId: threadId,
|
||||
pageNo,
|
||||
showInner: query.showInner || true,
|
||||
pageSize,
|
||||
cursor:
|
||||
+query.sortType === 3 ? query.cursor || '0' : (pageNo - 1) * pageSize,
|
||||
sortType: query.sortType || 1, //1:按推荐排序,2:按热度排序,3:按时间排序
|
||||
}
|
||||
return request(
|
||||
'POST',
|
||||
`https://music.163.com/api/v2/resource/comments`,
|
||||
data,
|
||||
{
|
||||
crypto: 'eapi',
|
||||
cookie: query.cookie,
|
||||
proxy: query.proxy,
|
||||
realIP: query.realIP,
|
||||
url: '/api/v2/resource/comments',
|
||||
},
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue