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);