UNPKG

mymusic-api-for-qq

Version:
53 lines (48 loc) 1.2 kB
// 新增根据关键字搜索 const options = { // w: '七里香', w:'', // kyeword n: 10, // limit p: 1, // page catZhida: 1, //搜索类型 remoteplace: 'txt.yqq.song', format: 'json', outCharset: 'utf-8', ct: 24, qqmusic_ver: 1298, new_json: 1, t: 0, aggr: 1, cr: 1, lossless: 0, flag_qc: 0, platform: 'yqq.json' } const config = { url:'https://c.y.qq.com/soso/fcgi-bin/client_search_cp', merge: (query,dotProp)=>{ // console.log(query) options.w = query.key return Object.assign(options,query) }, handle: (res,picSize) => { // let data = res.data.song // let newData = { // total: data.curnum, // page: data.curpage, // list: [] // } // data.list.forEach(item => { // newData.list.push({ // song_id: item.id, // song_albumId: item.index_album, // song_mid : item.mid, // song_name: item.name, // sont_time: item.time_public, // song_url:item.url // }) // }) return res } } module.exports = config