Created
January 18, 2018 17:09
-
-
Save kaycebasques/e64a073748492258ed589580f6f07b4b to your computer and use it in GitHub Desktop.
headful puppeteer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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