Skip to content

Instantly share code, notes, and snippets.

@LeoMartinDev
Created January 13, 2020 21:26
Show Gist options
  • Save LeoMartinDev/f1365cdb8b1781ae8c801e1ccf60d050 to your computer and use it in GitHub Desktop.
Save LeoMartinDev/f1365cdb8b1781ae8c801e1ccf60d050 to your computer and use it in GitHub Desktop.
puppeteer-extra with stealth plugin
const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');
puppeteer.use(StealthPlugin());
(async () => {
const browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']});
const page = await browser.newPage();
await page.goto('https://leboncoin.fr');
await page.screenshot({ path: 'leboncoin.png' });
await browser.close();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment