api/bilibili: don't return isHLS
Some checks are pending
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
Run service tests / test service functionality (push) Waiting to run
Run service tests / test service: ${{ matrix.service }} (push) Blocked by required conditions
Run tests / check lockfile correctness (push) Waiting to run
Run tests / web sanity check (push) Waiting to run
Run tests / api sanity check (push) Waiting to run

videos are no longer HLS i guess
This commit is contained in:
wukko 2025-07-07 18:08:26 +06:00
parent 43f4793448
commit 2e86a6ca70
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2

View File

@ -18,7 +18,7 @@ function extractBestQuality(dashData) {
}
async function com_download(id) {
let html = await fetch(`https://bilibili.com/video/${id}`, {
const html = await fetch(`https://bilibili.com/video/${id}`, {
headers: {
"user-agent": genericUserAgent
}
@ -34,7 +34,10 @@ async function com_download(id) {
return { error: "fetch.empty" };
}
let streamData = JSON.parse(html.split('<script>window.__playinfo__=')[1].split('</script>')[0]);
const streamData = JSON.parse(
html.split('<script>window.__playinfo__=')[1].split('</script>')[0]
);
if (streamData.data.timelength > env.durationLimit * 1000) {
return { error: "content.too_long" };
}
@ -48,7 +51,6 @@ async function com_download(id) {
urls: [video.baseUrl, audio.baseUrl],
audioFilename: `bilibili_${id}_audio`,
filename: `bilibili_${id}_${video.width}x${video.height}.mp4`,
isHLS: true
};
}