Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not bypass captcha ClouldFlare #47

Closed
alextran317 opened this issue May 7, 2024 · 3 comments
Closed

Not bypass captcha ClouldFlare #47

alextran317 opened this issue May 7, 2024 · 3 comments

Comments

@alextran317
Copy link

alextran317 commented May 7, 2024

Hello everyone!
I've been trying to use Puppeteer with the current browser but can't get bypass the captcha of this particular https://jobnib.com/book/i-am-the-luna-chapter-32
Here is my code.

`
(async () => {
var { connect } = await import('puppeteer-real-browser')
const { page, browser } = await connect({
headless: 'auto',
args: [],
customConfig: {},
skipTarget: [],
fingerprint: false,
turnstile: true,
connectOption: {},
fpconfig: {},
})

try {
    await page.goto('https://jobnib.com/book/i-am-the-luna-chapter-32');
    await sleep(30000)

} catch (error) {
    console.error('Lỗi:', error);
} finally {
    await browser.close();
    pool.end();
    process.exit(1); 
}

})();
`

Thank all

@zfcsoftware
Copy link
Owner

Hi, I was able to pass it without any problem. Can you please test it with the code below?

2024-05-07.13-00-24.mp4

(async () => {
    var { connect } = await import('puppeteer-real-browser')
    const { page, browser } = await connect({
    headless: 'auto',
    args: [],
    customConfig: {},
    skipTarget: [],
    fingerprint: false,
    turnstile: true,
    connectOption: {},
    fpconfig: {},
    })
    
    try {
        setInterval(() => {
            page.screenshot({ path: 'screenshot.png' });
        }, 1000);
        await page.goto('https://jobnib.com/book/i-am-the-luna-chapter-32');
        await page.waitForTimeout(30000);
    
    } catch (error) {
        console.error('Lỗi:', error);
    } finally {
        // await browser.close();
        // pool.end();
        // process.exit(1); 
    }
    })();

@alextran317
Copy link
Author

alextran317 commented May 8, 2024

Wow, I have also succeeded, but it has caused another problem, which is when I make multiple requests (even though I have slept for about 20s with each request), the website will block the device or IP address, then I cannot crawl anymore. So, could you please tell me how to handle the issue above?

Thank you very much

Capture

@zfcsoftware
Copy link
Owner

This seems to be due to the site crashing or banning the ip address. I suggest you increase your request range and start with a vpn or proxy. The issue in the discussion has been resolved so I'm closing it. Feel free to start a new one if you have any problems. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants