Update extractor.ts

This commit is contained in:
Killer069 2021-11-28 18:49:08 +05:30 committed by GitHub
parent 9313829d17
commit 5510db3bc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,6 +128,7 @@ 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!');
const player_data = body
.split('var ytInitialPlayerResponse = ')?.[1]
?.split(';</script>')[0]