mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 17:38:31 +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) {
|
async function com_download(id, episode = 1) {
|
||||||
let fetchUrl = `https://bilibili.com/video/${id}`;
|
const html = await fetch(`https://bilibili.com/video/${id}?p=${episode}`, {
|
||||||
if (episode > 1) {
|
|
||||||
fetchUrl += `?p=${episode}`
|
|
||||||
}
|
|
||||||
let html = await fetch(fetchUrl, {
|
|
||||||
headers: {
|
headers: {
|
||||||
"user-agent": genericUserAgent
|
"user-agent": genericUserAgent
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user