forked from metowolf/Meting-API
-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
633c102
commit 274b7b3
Showing
5 changed files
with
52 additions
and
16 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
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,25 @@ | ||
import { request } from "./util.js" | ||
import { map_song_list } from "./util.js" | ||
|
||
export const get_search_songs = async (id, cookie) => { | ||
|
||
const data = { | ||
s: id, | ||
type: 1, // 1: 单曲, 10: 专辑, 100: 歌手, 1000: 歌单, 1002: 用户, 1004: MV, 1006: 歌词, 1009: 电台, 1014: 视频 | ||
limit: 30, | ||
offset: 0, | ||
total: true, | ||
} | ||
|
||
const res = await request('POST', `https://interface.music.163.com/eapi/cloudsearch`, data, { | ||
crypto: 'eapi', | ||
cookie: {}, | ||
url: '/api/cloudsearch/pc' | ||
}) | ||
|
||
return map_song_list(res.result) | ||
|
||
} | ||
|
||
// const res = await get_search_songs("KN33S0XXX"); | ||
// console.log(res) |
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