Skip to content

Instantly share code, notes, and snippets.

@conanak99

conanak99/index.js

Created Nov 26, 2017
Embed
What would you like to do?
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({ headless: false });
const page = await browser.newPage();
page.setViewport({ width: 1280, height:720 });
await page.goto('http://kenh14.vn', { waitUntil: 'networkidle2' });
await page.screenshot({path: 'kenh14.png'});
await browser.close();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment