/pptr-html

Get html by puppeteer.

Primary LanguageTypeScriptMIT LicenseMIT

pptr-html

Get html by puppeteer.

version license size download

installation

npm install -S @jswork/pptr-html

usage

import pptrHtml from '@jswork/pptr-html';

pptrHtml('https://github.com/afeiship').then(res => {
  console.log(res);
});

options

{ headless: true, closeable: true, userAgent: nx.randomUa(), selector: null };

install puppeteer

# use taobao source
PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors npm i -D puppeteer

# or skip download
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm i puppeteer

license

Code released under the MIT license.