ZSCGR's picture
Upload folder using huggingface_hub
5ed446f verified
raw
history blame contribute delete
669 Bytes
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)