@mks2508/bundlp 0.1.18 → 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -2458,9 +2458,10 @@ async function extractVisitorData() {
2458
2458
  if (!session.visitorData) {
2459
2459
  log$6.warn("Could not extract visitorData from /tv page");
2460
2460
  const titleMatch = html.match(/<title>([^<]+)<\/title>/i);
2461
- if (titleMatch) log$6.debug(`Page title: ${titleMatch[1]}`);
2462
- const first500 = html.substring(0, 500);
2463
- if (first500.includes("robot") || first500.includes("bot") || first500.includes("Sign in")) {
2461
+ if (titleMatch) log$6.info(`Page title: ${titleMatch[1]}`);
2462
+ log$6.debug(`First 1000 chars: ${html.substring(0, 1e3)}`);
2463
+ const first1000 = html.substring(0, 1e3).toLowerCase();
2464
+ if (first1000.includes("robot") || first1000.includes("captcha") || first1000.includes("noindex") || first1000.includes("accounts.google")) {
2464
2465
  log$6.error("Bot detection on /tv page");
2465
2466
  return err(createError("BOT_DETECTION", "YouTube bot detection on /tv page"));
2466
2467
  }