mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08:00
新增已购单曲,获取mlog播放地址,将mlog id转为视频id,vip成长值,vip成长值获取记录,vip任务,领取vip成长值 等接口 #1248
This commit is contained in:
parent
5494359948
commit
ea86e5bbeb
@ -1,4 +1,7 @@
|
|||||||
# 更新日志
|
# 更新日志
|
||||||
|
### 4.0.15 | 2021.5.29
|
||||||
|
- 新增已购单曲,获取mlog播放地址,将mlog id转为视频id,vip成长值,vip成长值获取记录,vip任务,领取vip成长值 等接口 [#1248](https://github.com/Binaryify/NeteaseCloudMusicApi/pull/1248)
|
||||||
|
|
||||||
### 4.0.14 | 2021.5.28
|
### 4.0.14 | 2021.5.28
|
||||||
- 增加云贝推歌接口,云贝推歌历史记录接口 [#1246](https://github.com/Binaryify/NeteaseCloudMusicApi/pull/1246)
|
- 增加云贝推歌接口,云贝推歌历史记录接口 [#1246](https://github.com/Binaryify/NeteaseCloudMusicApi/pull/1246)
|
||||||
|
|
||||||
|
5
app.js
5
app.js
@ -42,8 +42,9 @@ app.use((req, res, next) => {
|
|||||||
;(req.headers.cookie || '').split(/\s*;\s*/).forEach((pair) => {
|
;(req.headers.cookie || '').split(/\s*;\s*/).forEach((pair) => {
|
||||||
let crack = pair.indexOf('=')
|
let crack = pair.indexOf('=')
|
||||||
if (crack < 1 || crack == pair.length - 1) return
|
if (crack < 1 || crack == pair.length - 1) return
|
||||||
req.cookies[decodeURIComponent(pair.slice(0, crack)).trim()] =
|
req.cookies[
|
||||||
decodeURIComponent(pair.slice(crack + 1)).trim()
|
decodeURIComponent(pair.slice(0, crack)).trim()
|
||||||
|
] = decodeURIComponent(pair.slice(crack + 1)).trim()
|
||||||
})
|
})
|
||||||
next()
|
next()
|
||||||
})
|
})
|
||||||
|
9
interface.d.ts
vendored
9
interface.d.ts
vendored
@ -1429,7 +1429,6 @@ export function cloud_match(
|
|||||||
} & RequestBaseConfig,
|
} & RequestBaseConfig,
|
||||||
): Promise<Response>
|
): Promise<Response>
|
||||||
|
|
||||||
|
|
||||||
export function yunbei_rcmd_song(
|
export function yunbei_rcmd_song(
|
||||||
params: {
|
params: {
|
||||||
id: number | string
|
id: number | string
|
||||||
@ -1461,17 +1460,13 @@ export function mlog_to_video(
|
|||||||
} & RequestBaseConfig,
|
} & RequestBaseConfig,
|
||||||
): Promise<Response>
|
): Promise<Response>
|
||||||
|
|
||||||
export function vip_growthpoint(
|
export function vip_growthpoint(params: RequestBaseConfig): Promise<Response>
|
||||||
params: RequestBaseConfig,
|
|
||||||
): Promise<Response>
|
|
||||||
|
|
||||||
export function vip_growthpoint_details(
|
export function vip_growthpoint_details(
|
||||||
params: MultiPageConfig & RequestBaseConfig,
|
params: MultiPageConfig & RequestBaseConfig,
|
||||||
): Promise<Response>
|
): Promise<Response>
|
||||||
|
|
||||||
export function vip_tasks(
|
export function vip_tasks(params: RequestBaseConfig): Promise<Response>
|
||||||
params: RequestBaseConfig,
|
|
||||||
): Promise<Response>
|
|
||||||
|
|
||||||
export function vip_growthpoint_get(
|
export function vip_growthpoint_get(
|
||||||
params: {
|
params: {
|
||||||
|
@ -15,5 +15,4 @@ module.exports = (query, request) => {
|
|||||||
realIP: query.realIP,
|
realIP: query.realIP,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,16 +6,10 @@ module.exports = (query, request) => {
|
|||||||
resolution: query.res || 1080,
|
resolution: query.res || 1080,
|
||||||
type: 1,
|
type: 1,
|
||||||
}
|
}
|
||||||
return request(
|
return request('POST', `https://music.163.com/weapi/mlog/detail/v1`, data, {
|
||||||
'POST',
|
|
||||||
`https://music.163.com/weapi/mlog/detail/v1`,
|
|
||||||
data,
|
|
||||||
{
|
|
||||||
crypto: 'weapi',
|
crypto: 'weapi',
|
||||||
cookie: query.cookie,
|
cookie: query.cookie,
|
||||||
proxy: query.proxy,
|
proxy: query.proxy,
|
||||||
realIP: query.realIP,
|
realIP: query.realIP,
|
||||||
},
|
})
|
||||||
)
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -13,8 +13,7 @@ module.exports = (query, request) => {
|
|||||||
},
|
},
|
||||||
).then((response) => {
|
).then((response) => {
|
||||||
try {
|
try {
|
||||||
const pattern =
|
const pattern = /<div class="cver u-cover u-cover-3">[\s\S]*?<img src="([^"]+)">[\s\S]*?<a class="sname f-fs1 s-fc0" href="([^"]+)"[^>]*>([^<]+?)<\/a>[\s\S]*?<a class="nm nm f-thide s-fc3" href="([^"]+)"[^>]*>([^<]+?)<\/a>/g
|
||||||
/<div class="cver u-cover u-cover-3">[\s\S]*?<img src="([^"]+)">[\s\S]*?<a class="sname f-fs1 s-fc0" href="([^"]+)"[^>]*>([^<]+?)<\/a>[\s\S]*?<a class="nm nm f-thide s-fc3" href="([^"]+)"[^>]*>([^<]+?)<\/a>/g
|
|
||||||
let result,
|
let result,
|
||||||
playlists = []
|
playlists = []
|
||||||
while ((result = pattern.exec(response.body)) != null) {
|
while ((result = pattern.exec(response.body)) != null) {
|
||||||
|
@ -16,5 +16,4 @@ module.exports = (query, request) => {
|
|||||||
realIP: query.realIP,
|
realIP: query.realIP,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,5 +13,4 @@ module.exports = (query, request) => {
|
|||||||
realIP: query.realIP,
|
realIP: query.realIP,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,5 +16,4 @@ module.exports = (query, request) => {
|
|||||||
realIP: query.realIP,
|
realIP: query.realIP,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,5 +15,4 @@ module.exports = (query, request) => {
|
|||||||
realIP: query.realIP,
|
realIP: query.realIP,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,5 +13,4 @@ module.exports = (query, request) => {
|
|||||||
realIP: query.realIP,
|
realIP: query.realIP,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,5 +18,4 @@ module.exports = (query, request) => {
|
|||||||
realIP: query.realIP,
|
realIP: query.realIP,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ module.exports = (query, request) => {
|
|||||||
page: JSON.stringify({
|
page: JSON.stringify({
|
||||||
size: query.size || 20,
|
size: query.size || 20,
|
||||||
cursor: query.cursor || '',
|
cursor: query.cursor || '',
|
||||||
})
|
}),
|
||||||
}
|
}
|
||||||
return request(
|
return request(
|
||||||
'POST',
|
'POST',
|
||||||
@ -18,5 +18,4 @@ module.exports = (query, request) => {
|
|||||||
realIP: query.realIP,
|
realIP: query.realIP,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "NeteaseCloudMusicApi",
|
"name": "NeteaseCloudMusicApi",
|
||||||
"version": "4.0.14",
|
"version": "4.0.15",
|
||||||
"description": "网易云音乐 NodeJS 版 API",
|
"description": "网易云音乐 NodeJS 版 API",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node app.js",
|
"start": "node app.js",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user