ZFC-Digital / puppeteer-real-browser

This package is designed to bypass puppeteer's bot-detecting captchas such as Cloudflare. It acts like a real browser and can be managed with puppeteer.
https://www.npmjs.com/package/puppeteer-real-browser
MIT License
787 stars 95 forks source link

reCAPTCHA v3 score very low #230

Open swanilla opened 4 days ago

swanilla commented 4 days ago

Description

I am running a web app that launches the puppeteer-real-browser instance on demand, i.e. when an API endpoint is hit. The puppeteer should then sign in to a web app that uses CAPTCHAs to protect their sign in page.

I use an extension to solve v2 CAPTCHAs (Capsolver), which does a good job most of the time. But even when it solves it, and I am able to click on the "Log in" button, I get back an error from the web app's API, something like "captcha incorrect"

I suspect it has something to do with the browser's reCAPTCHA v3 score being very low - almost always 0.1 when I check.

What can I do to improve this?

This seems valid for both Docker and local executions.

Full steps to reproduce the issue

Here is how I launch the browser:

    const { browser, page } = await connect(this.getBrowserOptions());

    // Method to retrieve browser launch options
    private getBrowserOptions(): Options {
        const extensionPath = path.join(process.cwd(), 'capsolver', `capsolver_extension_${this.proxyIndex}`);
        if (!fs.existsSync(extensionPath)) {
            throw new Error(`Directory does not exist: ${extensionPath}`);
        }
        if (!fs.existsSync(this.userDataDir)) {
            fs.mkdirSync(this.userDataDir);
        }
        const options: Options = {
            headless: false,
            disableXvfb: false,
            turnstile: true,
            connectOption: {
                defaultViewport: null,
            },
            customConfig: {
                userDataDir: this.userDataDir,
            },
            args: [`--disable-extensions-except=${extensionPath}`, `--load-extension=${extensionPath}`],
        };
        if (this.proxyIndex > 0) {
            const proxyParts = this.proxies[this.proxyIndex - 1].split(':');
            options.proxy = {
                host: proxyParts[0],
                port: parseInt(proxyParts[1]),
                username: proxyParts[2],
                password: proxyParts[3],
            };
        }
        return options;
    }

Issue Type

Performance, Support

Operating System

Linux, Mac OS

Do you use Docker?

I don't use Docker

rafa-9 commented 4 days ago

same issue here

ottodriver commented 3 days ago

same, recaptcha seems impossible to bypass at a high rate this days, I've tested a lot of proxies

rafa-9 commented 3 days ago

@ottodriver @swanilla are you guys using recaptcha solvers?

swanilla commented 2 days ago

@ottodriver @swanilla are you guys using recaptcha solvers?

I use an injected Chrome extension (Capsolver) as part of my browser instance, which seems to operate fine for the v2 reCAPTCHA, but it does not take care of the v3.

captainjackrana commented 1 day ago

Same issue here -- the --user-data-dir argument used to result in better Recaptcha scores earlier, however lately that's also not helping.

ottodriver commented 21 hours ago

Not using this library right now but note that: Seems to be working using same country and bordering countries proxies, anything else got low score / challenge triggered

RubberArchind commented 21 hours ago

have anyone try setting turnstile to false?

swanilla commented 13 hours ago

have anyone try setting turnstile to false?

I've tried numerous configurations, probably tried this at some point as well, but nothing helps.