# web-crawler-scaffold

> node 爬虫工具

Latest version **0.0.6** (published 2020-04-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install web-crawler-scaffold
pnpm add web-crawler-scaffold
yarn add web-crawler-scaffold
bun add web-crawler-scaffold
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2020-04-30 |
| First published | 2020-04-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 2.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | voidsteppers |

## Links

- npm: https://www.npmjs.com/package/web-crawler-scaffold
- npm.io page: https://npm.io/package/web-crawler-scaffold

## Dependencies (2)

- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.3
- [request](https://npm.io/package/request.md) ^2.88.2

## Recent versions

- 0.0.6 (latest) — 2020-04-30
- 0.0.5 — 2020-04-21
- 0.0.4 — 2020-04-21
- 0.0.3 — 2020-04-18
- 0.0.2 — 2020-04-18
- 0.0.1 — 2020-04-18

## README

# web-crawler-scaffold

封装  request、cheerio ，用来当 node 爬虫的脚手架

## Installation

```shell
$ npm i -g npm
$ npm i --save web-crawler-scaffold
```

## In Node.js

```javascript
const Crawler = require('web-crawler-scaffold')

const crawler = new Crawler()
```

## API

```javascript
// 发送 Get 请求
const { res, body, $ } = crawler.triggerGet({ url, headers? })
// 发送 Post 请求
const { res, body, $ } = crawler.triggerPost({ url, headers?, formData? })
// 休眠
await crawler.sleep()
```

## todo

- [x] 引入 cheerio，解析 html
- [ ]  代理ip
- [ ] 引入 Puppeteer ？

---
_Source: https://npm.io/package/web-crawler-scaffold · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
