Compare commits
1 commit
master
...
sensitive-
Author | SHA1 | Date | |
---|---|---|---|
501bd507e5 |
2 changed files with 7 additions and 1 deletions
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue