forked from Binaryify/NeteaseCloudMusicApi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Binaryify#1583 from kengwang/master
[feat] 新增新版 音乐链接获取 API
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// 歌曲链接 - v1 | ||
// 此版本不再采用 br 作为音质区分的标准 | ||
// 而是采用 standard, exhigh, lossless, hires 进行音质判断 | ||
|
||
const crypto = require('crypto') | ||
module.exports = (query, request) => { | ||
query.cookie.os = 'pc' | ||
const data = { | ||
ids: '[' + query.id + ']', | ||
level: query.level, | ||
encodeType: 'flac' | ||
} | ||
console.log(query) | ||
return request( | ||
'POST', | ||
`https://interface.music.163.com/eapi/song/enhance/player/url/v1`, | ||
data, | ||
{ | ||
crypto: 'eapi', | ||
cookie: query.cookie, | ||
proxy: query.proxy, | ||
realIP: query.realIP, | ||
url: '/api/song/enhance/player/url/v1', | ||
}, | ||
) | ||
} |