forked from qier222/YesPlayMusic
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 修复 issues qier222#1019 的跟进问题 (qier222#1068)
* issues qier222#1019 的迫真修复 * 修复 issues qier222#1019 * 修复 issues qier222#1019 * 改回 pickedLyric() 逻辑 * 更进一步的避免取词卡死问题 * 更新网易云 api 到 4.2.0 * Update README.md * Revert "Update README.md" This reverts commit b862ef7.
- Loading branch information
是虹川飴
authored
Dec 6, 2021
1 parent
8341727
commit 0d3df4a
Showing
28 changed files
with
286 additions
and
317 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// 歌手相关视频 | ||
|
||
module.exports = (query, request) => { | ||
const data = { | ||
artistId: query.id, | ||
page: JSON.stringify({ | ||
size: query.size || 10, | ||
cursor: query.cursor || 0, | ||
}), | ||
tab: 0, | ||
order: query.order || 0, | ||
} | ||
return request( | ||
'POST', | ||
`https://music.163.com/weapi/mlog/artist/video`, | ||
data, | ||
{ | ||
crypto: 'weapi', | ||
cookie: query.cookie, | ||
proxy: query.proxy, | ||
realIP: query.realIP, | ||
}, | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,47 @@ | ||
// 通过传过来的歌单id拿到所有歌曲数据 | ||
// 支持传递参数limit来限制获取歌曲的数据数量 例如: /playlist/track/all?id=7044354223&limit=10 | ||
|
||
module.exports = (query, request) => { | ||
const data = { | ||
id: query.id, | ||
n: 100000, | ||
s: query.s || 8, | ||
} | ||
//不放在data里面避免请求带上无用的数据 | ||
let limit = query.limit | ||
let trackIds | ||
let idsData = Object.create(null) | ||
|
||
return request('POST', `https://music.163.com/api/v6/playlist/detail`, data, { | ||
crypto: 'api', | ||
cookie: query.cookie, | ||
proxy: query.proxy, | ||
realIP: query.realIP, | ||
}).then((res) => { | ||
const ids = [] | ||
let trackIds = res.body.playlist.trackIds | ||
if (typeof limit === 'undefined') { | ||
limit = trackIds.length | ||
} | ||
trackIds.forEach((item, index) => { | ||
if (index < limit) { | ||
ids.push(item.id) | ||
} | ||
}) | ||
idsData = { | ||
c: '[' + ids.map((id) => '{"id":' + id + '}').join(',') + ']', | ||
} | ||
|
||
return request( | ||
'POST', | ||
`https://music.163.com/api/v3/song/detail`, | ||
idsData, | ||
{ | ||
crypto: 'weapi', | ||
cookie: query.cookie, | ||
proxy: query.proxy, | ||
realIP: query.realIP, | ||
}, | ||
) | ||
}) | ||
} |
Oops, something went wrong.