Skip to content

Instantly share code, notes, and snippets.

@kaycebasques
Created January 18, 2018 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaycebasques/e64a073748492258ed589580f6f07b4b to your computer and use it in GitHub Desktop.
Save kaycebasques/e64a073748492258ed589580f6f07b4b to your computer and use it in GitHub Desktop.
headful puppeteer
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({ headless: false });
const page = await browser.newPage();
const client = await page.target().createCDPSession();
await client.send('Network.setBlockedUrls', {
urls: [ 'example.com' ]
});
await page.goto('https://google.com');
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment