title: Puppeteer, cloudflare websites return 403 (forbidden)
body: <p>i'm trying to scrape from a cloudflare website. But whatever i do i get 403 forbidden errors.</p>
  <p>I've read that this is because of the headless request. Is there any way to bypass this?
  I'll leave my current settings below. Is there anything more i can do to prevent detection?</p>
  <pre><code>const puppeteer = require(&quot;puppeteer-extra&quot;);
  const StealthPlugin = require(&quot;puppeteer-extra-plugin-stealth&quot;);
  puppeteer.use(StealthPlugin());
  
  (async () =&gt; {
    const args = [
      &quot;--no-sandbox&quot;,
      &quot;--disable-setuid-sandbox&quot;,
      &quot;--disable-accelerated-2d-canvas&quot;,
      &quot;--no-zygote&quot;,
      &quot;--renderer-process-limit=1&quot;,
      &quot;--no-first-run&quot;,
      &quot;--ignore-certificate-errors&quot;,
      &quot;--ignore-certificate-errors-spki-list&quot;,
      &quot;--disable-dev-shm-usage&quot;,
      &quot;--disable-infobars&quot;,
      &quot;--lang=en-US,en&quot;,
      &quot;--window-size=1920x1080&quot;,
      &quot;--disable-extensions&quot;,
    ];
  
    const options = {
      args,
      headless: true,
      ignoreHTTPSErrors: true,
      userDataDir: &quot;./tmp&quot;,
      executablePath: &quot;/snap/bin/chromium&quot;,
    };
  
    try {
      const browser = await puppeteer.launch(options);
      const page = await browser.newPage();
  
      page.on(&quot;response&quot;, (response) =&gt; {
        console.log(response.status());
      });
  
      await page.setExtraHTTPHeaders({
        &quot;Accept-Language&quot;: &quot;en,en-US;q=0,5&quot;,
        Accept: &quot;text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8&quot;,
      });
  
      await page.waitFor(5000);
  
      await page.goto(process.argv[2]);
  
      await browser.close();
    } catch (err) {
      console.log(err);
    }
  })();
  </code></pre>