hCaptcha solver for Playwright written in Typescript
A library to solve hcaptcha challenges that are automated within Playwright. You can automatically set response values where they should be so the only thing left for you is submitting the page or you can get the response token. Average response time is rougly 13 - 20 seconds with TensorFlow's Image Recognition.
Best results with Playwright-stealth
yarn add https://github.com/xrip/playwright-hcaptcha-solver.git
await solveCaptcha(page);
page
<Page> - Playwright Page Instance
import { chromium } from 'playwright';
import { solveCaptcha } from 'playwright-hcaptcha-solver';
(async () => {
const browser = await chromium.launch({
headless: false,
args: [
'--disable-blink-features=AutomationControlled',
],
});
const ctx = await browser.newContext();
await ctx.addInitScript(() => {
});
const page = await ctx.newPage();
await page.goto('http://democaptcha.com/demo-form-eng/hcaptcha.html');
await solveCaptcha(page);
await Promise.all([
page.waitForNavigation(),
page.click('input[type="submit"]'),
]);
const h2 = await page.waitForSelector('h2')
console.log(`Done. Result: "${await h2.textContent()}"`);
await browser.close();
})();
- Based on puppeteer-hcaptcha by aw1875
- Thanks to Futei, JimmyLaurent, Nayde, DinoHorvat, and Tal