# body-snatchers

> Get bodies from web pages

Latest version **1.2.0** (published 2022-08-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install body-snatchers
pnpm add body-snatchers
yarn add body-snatchers
bun add body-snatchers
```

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2022-08-04 |
| First published | 2020-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 3 |
| Unpacked size | 11.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | zvakanaka |

## Links

- npm: https://www.npmjs.com/package/body-snatchers
- Repository: https://github.com/zvakanaka/body-snatchers
- Homepage: https://github.com/zvakanaka/body-snatchers#readme
- Issues: https://github.com/zvakanaka/body-snatchers/issues
- npm.io page: https://npm.io/package/body-snatchers

## Dependencies (3)

- [puppeteer](https://npm.io/package/puppeteer.md) ^16.0.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0
- [sequential-promise-all](https://npm.io/package/sequential-promise-all.md) ^1.0.2

## Recent versions

- 1.2.0 (latest) — 2022-08-04
- 1.1.0 — 2020-05-13
- 1.0.0 — 2020-04-08

## README

Get the HTML text bodies from web pages
# Get a single body
```javascript
const { getBody } = require('body-snatchers')

const bodyString = await getBody('https://news.ycombinator.com/', false)
```
# Multiple bodies
```javascript
const { getBodies } = require('body-snatchers')

const bodyStrings = await getBodies([
  { url: 'https://news.ycombinator.com/' },
  { url: 'https://google.com/', js: true } // page that requires JavaScript
])
```

## Motivation
* Ease burden on CPU (requests pages one at a time)
* Work on Raspberry Pi (tested on 2, 3, 4<sup>[*](./raspberry-pi-4-instructions.md)</sup>)

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