This commit is contained in:
Fijxu 2025-02-16 15:41:09 -03:00
parent d32574db8a
commit 501bd507e5
Signed by: Fijxu
GPG key ID: 32C1DDF333EDA6A4
2 changed files with 7 additions and 1 deletions

View file

@ -46,6 +46,11 @@ export const youtubePlayerParsing = async (
konfigStore,
);
const videoData = youtubePlayerResponse.data;
// console.log(videoData)
if (videoData.playabilityStatus.status == "ERROR") {
throw("test")
}
const video = new YT.VideoInfo(
[youtubePlayerResponse],
@ -53,6 +58,7 @@ export const youtubePlayerParsing = async (
generateRandomString(16),
);
const streamingData = video.streaming_data;
// Modify the original YouTube response to include deciphered URLs

View file

@ -51,7 +51,7 @@ latestVersion.get("/", async (c) => {
youtubePlayerResponseJson,
);
if (videoInfo.playability_status?.status !== "OK") {
if ((videoInfo.playability_status?.status !== "OK") && (videoInfo.playability_status?.status !== "CONTENT_CHECK_REQUIRED")) {
throw ("The video can't be played: " + id + " due to reason: " +
videoInfo.playability_status?.reason);
}