From 74de1739c88c227a64d20284f04e514b67501904 Mon Sep 17 00:00:00 2001 From: killer069 <65385476+killer069@users.noreply.github.com> Date: Mon, 30 Aug 2021 21:05:33 +0530 Subject: [PATCH] 404 finally fixed --- play-dl/YouTube/stream.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/play-dl/YouTube/stream.ts b/play-dl/YouTube/stream.ts index bd6037d..5e93f06 100644 --- a/play-dl/YouTube/stream.ts +++ b/play-dl/YouTube/stream.ts @@ -44,7 +44,7 @@ export async function stream(url : string, error_check : boolean = false): Promi } if(error_check){ - let response = await got(info.video_details.url) + let response = await got(info.format[info.format.length - 1].url) if(response.statusCode >= 400){ return await stream(info.video_details.url, true) } @@ -78,7 +78,7 @@ export async function stream_from_info(info : InfoData, error_check : boolean = } if(error_check){ - let response = await got(info.video_details.url) + let response = await got(info.format[info.format.length - 1].url) if(response.statusCode >= 400){ return await stream(info.video_details.url, true) }