mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-06 04:32:40 +00:00
Added Captcha Error in search
This commit is contained in:
@@ -40,6 +40,8 @@ export async function yt_search(search: string, options: ParseSearchInterface =
|
||||
const body = await request(url, {
|
||||
headers: { 'accept-language': 'en-US,en-IN;q=0.9,en;q=0.8,hi;q=0.7' }
|
||||
});
|
||||
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 data = ParseSearchResult(body, options);
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user