puppeteer-extra icon indicating copy to clipboard operation
puppeteer-extra copied to clipboard

HA.com bot detection

Open smaili opened this issue 2 years ago • 2 comments

https://www.ha.com seems to be able to prevent puppeteer from working, even after I try to use the puppeteer-extra, puppeteer-extra-plugin-stealth and puppeteer-extra-plugin-adblocker plugins.

Code:

const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');
puppeteer.use(StealthPlugin());
const AdblockerPlugin = require('puppeteer-extra-plugin-adblocker');
puppeteer.use(AdblockerPlugin({ blockTrackers: true }));

async function run () {
  puppeteer.launch({
    headless: false,
    executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
  }).then(async browser => {
    const context = await browser.createIncognitoBrowserContext();
    const page = await context.newPage();
    await page.goto('https://www.ha.com/');
    await page.screenshot({ path: 'result.png', fullPage: true });
    await browser.close();
  });
}

run();

Is there an issue with one of the plugins or am I missing something?

smaili avatar Dec 16 '21 23:12 smaili

it works but throws a captcha up for me. figure out which captcha it is and try the captcha solver plugin.

a10kiloham avatar Jan 31 '22 12:01 a10kiloham

They changed the implementation, from my investigation the mechanism they had in place before performed a variety of browser tests and encrypted/decrypted everything. Seems just recently they switched to this captcha.

smaili avatar Jan 31 '22 16:01 smaili