Created
September 13, 2018 23:37
-
-
Save andrewserong/3761d329e06498797d3747916296e06e to your computer and use it in GitHub Desktop.
A quick script to start puppeteer
This file contains hidden or 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
// After installing 'puppeteer', run Node from a terminal, | |
// then type '.editor' to start a multi-line editor and type the following: | |
const puppeteer = require('puppeteer'); | |
let page; | |
let browser; | |
(async function() { | |
browser = await puppeteer.launch({ headless: false }); | |
page = await browser.newPage(); | |
})(); | |
// After this, you can then write `page.goto('https://www.google.com')` and | |
// start controlling Chromium from the Node interpreter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment