zfcsoftware / 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
353 stars 46 forks source link

More suggestions #58

Open bypassantibot opened 1 month ago

bypassantibot commented 1 month ago

Hello, I have some suggestions for this revolutionary project:

zfcsoftware commented 3 weeks ago

Thank you for your feedback and support.

MoonDoggie97 commented 3 weeks ago

Could you help me i cant figure out userDataDir at all i have tried it in custom config i have tried it in args nothing works

        try {
            const { connect } = await import('puppeteer-real-browser');

            connect({
                headless: 'auto',
                args: [],
                customConfig: {
                    userDataDir: './userdata5',
                },
                skipTarget: [],
                fingerprint: false,
                turnstile: true,
                connectOption: {},
                fpconfig: {}
            })
            .then(async response => {
                const { browser, page } = response;

                // Navigate to the desired URL
                console.log('Navigating to the game URL...');
MoonDoggie97 commented 3 weeks ago

I also tried it like this args: [ `--user-data-dir=${__dirname}/9eea9e17-d2e9-400a-bd0f-249c49a0a7b4-3624`, ],

bypassantibot commented 3 weeks ago
  • Turnstile is supported but a different library can be created for other captcha types.
  • I am working on this known problem
  • https://github.com/zfcsoftware/cf-clearance-scraper/blob/main/module/browser.js This browser rendering code is more undetectable. There will be no questions on systems such as Youtube, recaptcha v3. The library will be updated with this code.
  • userDataDir works without any problem. I can help if you add what kind of error you get.

Thank you for your feedback and support.

Also, keep in mind to check this: https://bypassantibot.github.io/detectCDP (I stole the CDP detection from datadome). Also there's one more thing that detects puppeteer.connect but I'm still trying to figure it out! For YouTube you have to disable default flags and predefine yours.

I used your base code and rewrote some things and now I got scores like +80% on creepjs.

Also, if you know how we can fix viewport to resize it automatically based on "--window-size=" argument, because in some scenarios if you have the same size on specific attributes (check creepjs for this) you might get flagged. let's say the window size is 1920x1080 and the viewport should be something like 1920x1040 and so on.

zfcsoftware commented 3 weeks ago

Could you help me i cant figure out userDataDir at all i have tried it in custom config i have tried it in args nothing works

        try {
            const { connect } = await import('puppeteer-real-browser');

            connect({
                headless: 'auto',
                args: [],
                customConfig: {
                    userDataDir: './userdata5',
                },
                skipTarget: [],
                fingerprint: false,
                turnstile: true,
                connectOption: {},
                fpconfig: {}
            })
            .then(async response => {
                const { browser, page } = response;

                // Navigate to the desired URL
                console.log('Navigating to the game URL...');

I also tried it like this args: [ `--user-data-dir=${__dirname}/9eea9e17-d2e9-400a-bd0f-249c49a0a7b4-3624`, ],

Please try this. https://github.com/zfcsoftware/puppeteer-real-browser/issues/46#issuecomment-2158069120