Emma
09/08/2024, 12:03 AMconst { 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/Hall
09/08/2024, 12:03 AMEmma
09/08/2024, 12:03 AMOleg V.
09/16/2024, 1:56 PMOleg V.
09/16/2024, 1:57 PM