mirror of
https://github.com/wukko/cobalt.git
synced 2025-03-20 08:18:54 +01:00
fixed download long youtube videos
This commit is contained in:
parent
1bc68f8f2b
commit
ded172733a
3 changed files with 5 additions and 5 deletions
|
@ -32,7 +32,7 @@
|
||||||
"dotenv": "^16.0.1",
|
"dotenv": "^16.0.1",
|
||||||
"express": "^4.21.2",
|
"express": "^4.21.2",
|
||||||
"express-rate-limit": "^7.4.1",
|
"express-rate-limit": "^7.4.1",
|
||||||
"ffmpeg-static": "^5.1.0",
|
"ffmpeg-static": "^5.2.0",
|
||||||
"hls-parser": "^0.10.7",
|
"hls-parser": "^0.10.7",
|
||||||
"ipaddr.js": "2.2.0",
|
"ipaddr.js": "2.2.0",
|
||||||
"nanoid": "^5.0.9",
|
"nanoid": "^5.0.9",
|
||||||
|
|
|
@ -153,7 +153,7 @@ export default async function (o) {
|
||||||
|
|
||||||
if (cookie) {
|
if (cookie) {
|
||||||
useHLS = false;
|
useHLS = false;
|
||||||
innertubeClient = "WEB";
|
innertubeClient = "WEB_EMBEDDED";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (useHLS) {
|
if (useHLS) {
|
||||||
|
@ -457,7 +457,7 @@ export default async function (o) {
|
||||||
urls = audio.uri;
|
urls = audio.uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (innertubeClient === "WEB" && innertube) {
|
if (innertubeClient === "WEB_EMBEDDED" && innertube) {
|
||||||
urls = audio.decipher(innertube.session.player);
|
urls = audio.decipher(innertube.session.player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -491,7 +491,7 @@ export default async function (o) {
|
||||||
filenameAttributes.resolution = `${video.width}x${video.height}`;
|
filenameAttributes.resolution = `${video.width}x${video.height}`;
|
||||||
filenameAttributes.extension = codecList[codec].container;
|
filenameAttributes.extension = codecList[codec].container;
|
||||||
|
|
||||||
if (innertubeClient === "WEB" && innertube) {
|
if (innertubeClient === "WEB_EMBEDDED" && innertube) {
|
||||||
video = video.decipher(innertube.session.player);
|
video = video.decipher(innertube.session.player);
|
||||||
audio = audio.decipher(innertube.session.player);
|
audio = audio.decipher(innertube.session.player);
|
||||||
} else if (video.url && audio.url) {
|
} else if (video.url && audio.url) {
|
||||||
|
|
|
@ -35,7 +35,7 @@ importers:
|
||||||
specifier: ^7.4.1
|
specifier: ^7.4.1
|
||||||
version: 7.4.1(express@4.21.2)
|
version: 7.4.1(express@4.21.2)
|
||||||
ffmpeg-static:
|
ffmpeg-static:
|
||||||
specifier: ^5.1.0
|
specifier: ^5.2.0
|
||||||
version: 5.2.0
|
version: 5.2.0
|
||||||
hls-parser:
|
hls-parser:
|
||||||
specifier: ^0.10.7
|
specifier: ^0.10.7
|
||||||
|
|
Loading…
Reference in a new issue