Update api/src/processing/services/bilibili.js

Co-authored-by: wukko <me@wukko.me>
This commit is contained in:
charles 2025-05-05 16:52:43 +08:00 committed by GitHub
parent d29584ea21
commit 3204b82dfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,11 +18,7 @@ function extractBestQuality(dashData) {
}
async function com_download(id, episode = 1) {
let fetchUrl = `https://bilibili.com/video/${id}`;
if (episode > 1) {
fetchUrl += `?p=${episode}`
}
let html = await fetch(fetchUrl, {
const html = await fetch(`https://bilibili.com/video/${id}?p=${episode}`, {
headers: {
"user-agent": genericUserAgent
}