Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afeiship/pptr-html
Get html by puppeteer.
https://github.com/afeiship/pptr-html
crawl html pptr puppeteer spider
Last synced: 13 days ago
JSON representation
Get html by puppeteer.
- Host: GitHub
- URL: https://github.com/afeiship/pptr-html
- Owner: afeiship
- License: mit
- Created: 2020-07-15T08:54:28.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-30T02:33:20.000Z (over 3 years ago)
- Last Synced: 2025-01-14T23:29:38.847Z (about 1 month ago)
- Topics: crawl, html, pptr, puppeteer, spider
- Language: TypeScript
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# pptr-html
> Get html by puppeteer.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```shell
npm install -S @jswork/pptr-html
```## usage
```js
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/```shell
# 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](https://github.com/afeiship/pptr-html/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/pptr-html
[version-url]: https://npmjs.org/package/@jswork/pptr-html[license-image]: https://img.shields.io/npm/l/@jswork/pptr-html
[license-url]: https://github.com/afeiship/pptr-html/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/pptr-html
[size-url]: https://github.com/afeiship/pptr-html/blob/master/dist/pptr-html.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/pptr-html
[download-url]: https://www.npmjs.com/package/@jswork/pptr-html