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
360 stars 45 forks source link

captcha issue #64

Open akwin1234 opened 3 weeks ago

akwin1234 commented 3 weeks ago

i am making some automation project it needs to login in certain website. when i try to login it keeps saying captcha modules are not initiated in the website i am trying to login into.

my code:

    const { page, browser, setTarget } = response
    const { width, height } = await page.evaluate(() => {
        return {
            width: window.screen.width,
            height: window.screen.height
        };
    });

    await page.setViewport({ width, height });
    await loadCookies(browser);
    setTarget({ status: true });
    await page.goto('https://stake.com/', {
        waitUntil: 'domcontentloaded'
    })

    await sleep(7000);
    setTarget({ status: false });
    await page.reload(); // tried to remove this too nothing worked.

    await sleep(7000);
    setTarget({ status: false });

  I have tried setTarget({ status: false }); and etc. but nothing is working. How do i make puppeteer-real-browser not to alter website once captcha solving or cdn bypassing has been done?
zfcsoftware commented 3 weeks ago

The sample site doesn't open and I don't understand the problem you are having. Can you show it with a video? image image

akwin1234 commented 3 weeks ago

The sample site doesn't open and I don't understand the problem you are having. Can you show it with a video? Sure here is the video & my code

`import { connect } from 'puppeteer-real-browser'; import fs from 'fs';

async function sleep(ms) { return new Promise((resolve) => { setTimeout(resolve, ms); }); }

connect({ turnstile: false, fingerprint: false }) .then(async response => { const { page, browser, setTarget } = response const { width, height } = await page.evaluate(() => { return { width: window.screen.width, height: window.screen.height }; });

    await page.setViewport({ width, height });

    setTarget({ status: true });
    await page.goto('https://stake.com/', {
        waitUntil: 'domcontentloaded'
    })

    await sleep(7000);
    setTarget({ status: false });  
    await page.reload();

    await sleep(7000);
    setTarget({ status: false }); // this code doesnt help me load captchas even if i wait around. same error comes.

}) `

https://github.com/zfcsoftware/puppeteer-real-browser/assets/15890770/274d3bc5-501a-47ff-b26e-1c5d229e33e2

EDIT: i think you are getting SSL error because stake is blocked in few GEO may be thats why

sharpanimes commented 2 weeks ago

Use dev tools to check the network tab and check which scripts are failing to load...