Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

235
Visualizações
How to let cloudflare redirect on puppeteer (or, maybe, puppeteer alternatives)?

How to use puppeteer to access a site that is protected with CloudFlare? It's not that it blocks my connection or even shows a captcha. The principle of operation is as follows: I enter the site address, I get to the CloudFlare page, after a couple of seconds it redirects me to the site itself. When using puppeteer redirects do not occur. However, if you use "headless":false and carefully monitor the Chromium address bar, you can notice that for a split second it changes, but ultimately no redirect occurs.

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({"headless":false});
  const page = await browser.newPage();
  await page.goto('https://www.orrick.com/');
  await page.waitForSelector(".homepage");
  await page.screenshot({path: 'example.png'});

  await browser.close();
})();

Video (speed 0.1): https://gfycat.com/circularfearlessgemsbuck

P. S. The application for which I am trying to use puppeteer is written in PHP. I am ready to consider any analogues of puppeteer that provide similar functionality (web browser emulation) and are actual as of 2022.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda