Apify

Apify and Crawlee Official Forum

b
F
A
J
A

How to launch a crawlee browser that I can manually pass the cloudfare anti-bot protection

This is my code to launch the browser with headless: false mode. I mannualy input the URL and try to pass the captcha challenges. But the challenges keep failing
This is the code

Plain Text
const { launchPuppeteer } = require('crawlee');
const puppeteerExtra = require('puppeteer-extra');
const stealthPlugin = require('puppeteer-extra-plugin-stealth');

// Use the stealth plugin
puppeteerExtra.use(stealthPlugin());

const main = async () => {
    // Launch the browser without running any crawl
    const browser = await launchPuppeteer({
        // !!! You need to specify this option to tell Crawlee to use puppeteer-extra as the launcher !!!
        launcher: puppeteerExtra,
        launchOptions: {
            // Other puppeteer options work as usual
            headless: false,
        },
    });

    // Create and navigate new page 
    console.log('Open target page');
    const page = await browser.newPage();

    // Now you can play around with the browser
    console.log('Browser launched. You can now interact with it.');
    
    // Keep the script running
    await new Promise((resolve) => {
        console.log('Press Ctrl+C to exit.');
    });
};

main().catch(console.error);


This is the test URL
https://www.nivod.cc/
E
O
3 comments
This is what happened to me in video
This section should help:
https://docs.apify.com/academy/anti-scraping/mitigation

Try to play around with proxies and fingerprints.
Also, try to use Playwright + firefox . It's more undetectable than pptr
Add a reply
Sign up and join the conversation on Discord
Join