Fixed Playlist toJSON function

This commit is contained in:
killer069
2021-11-29 09:43:25 +05:30
parent 83d7810eae
commit dc0e987014
5 changed files with 29 additions and 28 deletions

View File

@@ -128,7 +128,8 @@ export async function video_basic_info(url: string, options: InfoOptions = {}):
cookies: true
});
}
if (body.indexOf('Our systems have detected unusual traffic from your computer network.') !== -1) throw new Error('Captcha page: YouTube has detected that you are a bot!');
if (body.indexOf('Our systems have detected unusual traffic from your computer network.') !== -1)
throw new Error('Captcha page: YouTube has detected that you are a bot!');
const player_data = body
.split('var ytInitialPlayerResponse = ')?.[1]
?.split(';</script>')[0]