mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: 修复紧急修复后的问题
This commit is contained in:
parent
700e464e2c
commit
7d5694a88d
@ -310,7 +310,11 @@ export async function getBiliAudio(bvid, cid) {
|
|||||||
|
|
||||||
// 返回一个fetch的promise
|
// 返回一个fetch的promise
|
||||||
return (new Promise((resolve, reject) => {
|
return (new Promise((resolve, reject) => {
|
||||||
fetch(BILI_PLAY_STREAM.replace("{bvid}", bvid).replace("{cid}", cid))
|
fetch(BILI_PLAY_STREAM.replace("{bvid}", bvid).replace("{cid}", cid), {
|
||||||
|
headers: {
|
||||||
|
...BILI_HEADER,
|
||||||
|
}
|
||||||
|
})
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(json => resolve(json.data.dash.audio[0].baseUrl));
|
.then(json => resolve(json.data.dash.audio[0].baseUrl));
|
||||||
}))
|
}))
|
||||||
@ -324,7 +328,7 @@ export async function getBiliVideoWithSession(bvid, cid, SESSDATA) {
|
|||||||
return (new Promise((resolve, reject) => {
|
return (new Promise((resolve, reject) => {
|
||||||
fetch(BILI_PLAY_STREAM.replace("{bvid}", bvid).replace("{cid}", cid), {
|
fetch(BILI_PLAY_STREAM.replace("{bvid}", bvid).replace("{cid}", cid), {
|
||||||
headers: {
|
headers: {
|
||||||
// SESSDATA 字段
|
...BILI_HEADER,
|
||||||
Cookie: `SESSDATA=${ SESSDATA }`
|
Cookie: `SESSDATA=${ SESSDATA }`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user