0

Is there any way to avoid being detected by a website that I am using puppeteer? I just can't navigate around the https://www.footlocker.ca/ website using puppeteer. I have tried using stealth plugin and random user-agents to no avail.

Any advice on what else I can try?

sayan
  • 79
  • 1
  • 3
  • 12
  • Does this answer your question? [How to avoid being detected as bot on Puppeteer and Phantomjs?](https://stackoverflow.com/questions/51731848/how-to-avoid-being-detected-as-bot-on-puppeteer-and-phantomjs) – ggorlen Apr 02 '22 at 00:00
  • A [mcve] of your code would be helpful so we can see what you've tried. – ggorlen Apr 02 '22 at 00:01

1 Answers1

0

This website use navigator.webdriver to check if you are real user or bot. so you can use the code below to delete navigator.webdriver value. docs.

const puppeteer = require("puppeteer");

(async () => {
  const browser = await puppeteer.launch({
    headless: false,
  });

  const page = await browser.newPage();

  await page.evaluateOnNewDocument(() => {
    delete navigator.__proto__.webdriver;
  });

  await page.goto("https://www.footlocker.ca", {
    waitUntil: "domcontentloaded",
  });
})();

Ahmed ElMetwally
  • 2,276
  • 3
  • 10
  • 15