Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

182
Views
How to avoid hcaptcha showing images to solve captcha while using puppeteer for webscraping

I am trying to scrape a site. But, when i try to pass captcha by pressing on captcha checkmark, it gives me the images to solve the captcha. Sometimes it does that and other times it just passes and navigates me to the page after solving captcha.

Below is the code of how I am setting up my puppeteer instance and page.

  puppeteer.use(StealthPlugin());
  
  const chromeOptions = {
    headless: false,
    ignoreHTTPSErrors: true,
    slowMo: 30,
    args: ['--no-sandbox'],
  }

  const browser = await puppeteer.launch(chromeOptions);
  const page = await browser.newPage();
  await page.evaluateOnNewDocument(() => {
    delete navigator.__proto__.webdriver;
  });

  await page.setUserAgent(randomUseragent.getRandom());
  await page.setJavaScriptEnabled(true);
  //page.setDefaultNavigationTimeout(0);
  await page.goto(`pagetoscrape`, {
    waitUntil: "domcontentloaded",
 });

And below is how I am trynna solve captcha.

  await delay(6000);
  const iframes = await page.$('iframe');
  const frame = await iframes.contentFrame();
  const a = await frame.$('#checkbox');
  await a.click();
  await delay(5000);
  await page.screenshot({path: 'headless-test-result.png'});
  console.log("Solving captcha........");
  await page.waitForNavigation();
  await delay(7000);
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!