Last active
May 13, 2019 18:50
-
-
Save vitallium/c3ba4ad5a09aff356e6ba2c60c56f277 to your computer and use it in GitHub Desktop.
Version 76.0.152.0 (Official build) dev (64-bit)
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({ | |
executablePath: 'C:\\Program Files (x86)\\Microsoft\\Edge Dev\\Application\\msedge.exe', | |
args: ['--remote-debugging-port=9222'] | |
}); | |
const page = await browser.newPage(); | |
await page.waitFor(5000); | |
await page.goto('https://news.ycombinator.com', {waitUntil: 'networkidle2'}); | |
await page.pdf({ path: 'hn.pdf', format: 'A4' }); | |
// await browser.close(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment