Get html by puppeteer.
npm install -S @jswork/pptr-html
import pptrHtml from '@jswork/pptr-html';
pptrHtml('https://github.com/afeiship').then(res => {
console.log(res);
});
{ headless: true, closeable: true, userAgent: nx.randomUa(), selector: null };
# 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
Code released under the MIT license.