mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 09:28:29 +00:00
Update api/src/processing/services/bilibili.js
Co-authored-by: wukko <me@wukko.me>
This commit is contained in:
parent
d29584ea21
commit
3204b82dfd
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user