Puppeteer – Headless Chrome Node API

Puppeteer is a Node library which provides a high-level API to control headless Chrome over the DevTools Protocol. It can also be configured to use full (non-headless) Chrome.

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.goto('https://example.com');
  await page.screenshot({path: 'example.png'});

  browser.close();
})();

Puppeteer – Headless Chrome Node API →

Elsewhere , , , ,

One Response to Puppeteer – Headless Chrome Node API

  1. Pingback: Browsershot: Convert a webpage to an image or PDF using headless Chrome | Bram.us

Leave a Reply

Your email address will not be published. Required fields are marked *