mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-05 21:58:56 +08:00
更新直连kw
This commit is contained in:
parent
21bf84e804
commit
dbdda8b484
@ -3,17 +3,20 @@ import { timeout } from '../options'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
getMusicUrl(songInfo, type) {
|
getMusicUrl(songInfo, type) {
|
||||||
const target_url = `http://www.kuwo.cn/api/v1/www/music/playUrl?mid=${songInfo.songmid}&type=convert_url3&br=128kmp3`
|
const target_url = `http://www.kuwo.cn/api/v1/www/music/playUrl?mid=${songInfo.songmid}&type=music&br=${type}`
|
||||||
const requestObj = httpFetch(target_url, {
|
const requestObj = httpFetch(target_url, {
|
||||||
method: 'get',
|
method: 'get',
|
||||||
timeout,
|
timeout,
|
||||||
headers: {
|
headers: {
|
||||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0',
|
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0',
|
||||||
Referer: 'http://kuwo.cn/',
|
Referer: 'http://kuwo.cn/',
|
||||||
|
Secret: '14da58a88a83170f11c3a63bb0ff6aec68a7487b64551a1f997356d719980a2b028f34f5',
|
||||||
|
cookie: 'Hm_Iuvt_cdb524f42f0cer9b268e4v7y734w5esq24=4cGcsx3ej3tkYfeGrFtdS2kSZ6YD3nbD',
|
||||||
},
|
},
|
||||||
|
credentials: 'omit',
|
||||||
})
|
})
|
||||||
requestObj.promise = requestObj.promise.then(({ body }) => {
|
requestObj.promise = requestObj.promise.then(({ body }) => {
|
||||||
// console.log(body)
|
// console.log(JSON.stringify(body))
|
||||||
if (body.code != 200) return Promise.reject(new Error('failed'))
|
if (body.code != 200) return Promise.reject(new Error('failed'))
|
||||||
|
|
||||||
return { type, url: body.data.url }
|
return { type, url: body.data.url }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user