Closed 41Baloo closed 2 years ago
Give v1.6.4 a try.
I think the issue was chrome preventing cross frame scripting. I updated the code example in the readme to use https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox.php as the demo site and added a waitForCaptcha
method since that demo site defers loading of the captcha script.
await page.goto('https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox.php');
await solver.waitForCaptcha(page); // Captcha script is deferred, so will load after page.goto completes
await solver.solveRecaptcha(page);
await page.screenshot({ path: 'is-recaptcha-solved.png' });
Yup. seems to work for me aswell, thanks.
Awesome, thanks for confirming.
The captcha solver will fail on most recaptcha implementations because it cannot find the captcha.
I assume that's because, unlike https://www.google.com/recaptcha/api2/demo, most people don't have the "https://www.google.com/recaptcha/api2/anchor" embeded directly into the main page but rather load it via https://www.google.com/recaptcha/api.js?hl=en (like https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox.php for example)