mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-07-07 09:02:08 +08:00
redo cookie modification with cookie parser
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
// 发送与删除评论
|
||||
|
||||
module.exports = (query, request) => {
|
||||
query.cookie = 'os=pc; ' + query.cookie
|
||||
query.cookie.os = 'pc'
|
||||
query.t = (query.t == 1 ? 'add' : 'delete')
|
||||
query.type = {
|
||||
0: 'R_SO_4_', // 歌曲
|
||||
|
@ -1,7 +1,7 @@
|
||||
// 热门评论
|
||||
|
||||
module.exports = (query, request) => {
|
||||
query.cookie = 'os=pc; ' + query.cookie
|
||||
query.cookie.os = 'pc'
|
||||
query.type = {
|
||||
0: 'R_SO_4_', // 歌曲
|
||||
1: 'R_MV_5_', // MV
|
||||
|
@ -1,7 +1,7 @@
|
||||
// 评论点赞与取消
|
||||
// 点赞与取消点赞评论
|
||||
|
||||
module.exports = (query, request) => {
|
||||
query.cookie = 'os=pc; ' + query.cookie
|
||||
query.cookie.os = 'pc'
|
||||
query.t = (query.t == 1 ? 'like' : 'unlike')
|
||||
query.type = {
|
||||
0: 'R_SO_4_', // 歌曲
|
||||
|
@ -1,4 +1,4 @@
|
||||
//垃圾桶
|
||||
// 垃圾桶
|
||||
|
||||
module.exports = (query, request) => {
|
||||
const data = {
|
||||
|
@ -1,12 +1,12 @@
|
||||
// MV链接
|
||||
|
||||
module.exports = (query, request) => {
|
||||
const data = {
|
||||
id: query.id,
|
||||
r: query.res || 1080
|
||||
}
|
||||
return request(
|
||||
'POST', `http://music.163.com/weapi/song/enhance/play/mv/url`, data,
|
||||
{crypto: 'weapi', cookie: query.cookie, proxy: query.proxy}
|
||||
)
|
||||
const data = {
|
||||
id: query.id,
|
||||
r: query.res || 1080
|
||||
}
|
||||
return request(
|
||||
'POST', `http://music.163.com/weapi/song/enhance/play/mv/url`, data,
|
||||
{crypto: 'weapi', cookie: query.cookie, proxy: query.proxy}
|
||||
)
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
// 创建歌单
|
||||
|
||||
module.exports = (query, request) => {
|
||||
query.cookie = 'os=pc; ' + query.cookie
|
||||
query.cookie.os = 'pc'
|
||||
const data = {
|
||||
name: query.name
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// 编辑歌单
|
||||
|
||||
module.exports = (query, request) => {
|
||||
query.cookie = 'os=pc; ' + query.cookie
|
||||
query.cookie.os = 'pc'
|
||||
query.desc = query.desc || ''
|
||||
query.tags = query.tags || ''
|
||||
const data = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// 获取音乐详情
|
||||
// 歌曲详情
|
||||
|
||||
module.exports = (query, request) => {
|
||||
query.ids = query.ids.split(/\s*,\s*/)
|
||||
|
@ -1,6 +1,9 @@
|
||||
// 音乐链接
|
||||
// 歌曲链接
|
||||
|
||||
const crypto = require('crypto')
|
||||
|
||||
module.exports = (query, request) => {
|
||||
if(!('MUSIC_U' in query.cookie)) query.cookie._ntes_nuid = crypto.randomBytes(16).toString("hex")
|
||||
const data = {
|
||||
ids: '[' + parseInt(query.id) + ']',
|
||||
br: parseInt(query.br || 999000)
|
@ -2,7 +2,7 @@
|
||||
|
||||
module.exports = (query, request) => {
|
||||
const data = {
|
||||
limit: query.limit || 10,
|
||||
limit: query.limit || 200,
|
||||
offset: query.offset || 0
|
||||
}
|
||||
return request(
|
||||
|
@ -1,4 +1,4 @@
|
||||
// 云盘数据详情? 暂时不要使用
|
||||
// 云盘数据详情?(暂时不要使用)
|
||||
|
||||
module.exports = (query, request) => {
|
||||
const data = {
|
||||
|
Reference in New Issue
Block a user