@jswork/pptr-html
v1.2.0
Published
Get html by puppeteer.
Readme
pptr-html
Get html by puppeteer.
installation
npm install -S @jswork/pptr-htmlusage
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
- https://gera2ld.space/posts/how-to-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 puppeteerlicense
Code released under the MIT license.
