Skip to content

Instantly share code, notes, and snippets.

@andrewserong
Created September 13, 2018 23:37
Show Gist options
  • Save andrewserong/3761d329e06498797d3747916296e06e to your computer and use it in GitHub Desktop.
Save andrewserong/3761d329e06498797d3747916296e06e to your computer and use it in GitHub Desktop.
A quick script to start puppeteer
// 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