Update extractor.ts
This commit is contained in:
parent
9313829d17
commit
5510db3bc0
@ -128,6 +128,7 @@ export async function video_basic_info(url: string, options: InfoOptions = {}):
|
|||||||
cookies: true
|
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
|
const player_data = body
|
||||||
.split('var ytInitialPlayerResponse = ')?.[1]
|
.split('var ytInitialPlayerResponse = ')?.[1]
|
||||||
?.split(';</script>')[0]
|
?.split(';</script>')[0]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user