mirror of
https://github.com/imputnet/cobalt.git
synced 2026-01-07 10:18:20 +00:00
api/bilibili: use another user agent (#1472)
This commit is contained in:
parent
91989b8de1
commit
1ad54bc13f
@ -1,4 +1,4 @@
|
|||||||
import { genericUserAgent, env } from "../../config.js";
|
import { env } from "../../config.js";
|
||||||
import { resolveRedirectingURL } from "../url.js";
|
import { resolveRedirectingURL } from "../url.js";
|
||||||
|
|
||||||
// TO-DO: higher quality downloads (currently requires an account)
|
// TO-DO: higher quality downloads (currently requires an account)
|
||||||
@ -26,7 +26,7 @@ async function com_download(id, partId) {
|
|||||||
|
|
||||||
const html = await fetch(url, {
|
const html = await fetch(url, {
|
||||||
headers: {
|
headers: {
|
||||||
"user-agent": genericUserAgent
|
"user-agent": "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)",
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(r => r.text())
|
.then(r => r.text())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user