Compare commits

...
This repository has been archived on 2025-03-25. You can view files and clone it, but cannot push or open issues or pull requests.

1 commit

Author SHA1 Message Date
501bd507e5
wip 2025-02-16 15:41:09 -03:00
2 changed files with 7 additions and 1 deletions

View file

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

View file

@ -51,7 +51,7 @@ latestVersion.get("/", async (c) => {
youtubePlayerResponseJson, 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: " + throw ("The video can't be played: " + id + " due to reason: " +
videoInfo.playability_status?.reason); videoInfo.playability_status?.reason);
} }