Solving Google captcha with 2captcha in puppeteer

lSteve

New member
I saw a video on YouTube that can solve captcha with puppeteer and 2captch it work I received the solution and it placed in

g-recaptcha-response

but the problem there is no button to procced to the next page the captcha appear at its own page like the following pic:

1631002643759.png


I tried to reload the page using this line of code

await page[0].reload({ waitUntil: ["networkidle0", "domcontentloaded"] });

I print out the page title to be able to see if the captcha page solved:

var pagetitle3 = await page[0].title();

console.log(pagetitle3);

It work only in headless mode is false but when the headless mode is true it won't

YouTube link:
source code: https://jsoverson.medium.com/bypassing-captchas-with-headless-chrome-93f294518337

if anyone can help me tank you very much :)