# mini-scrape

> simple scrape function working only nodejs

Latest version **1.1.0** (published 2018-08-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install mini-scrape
pnpm add mini-scrape
yarn add mini-scrape
bun add mini-scrape
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2018-08-03 |
| First published | 2018-04-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 72.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | mottox2 |
| Maintainers | mottox2 |

## Links

- npm: https://www.npmjs.com/package/mini-scrape
- Repository: https://github.com/mottox2/mini-scrape
- Issues: https://github.com/mottox2/mini-scrape/issues
- npm.io page: https://npm.io/package/mini-scrape

## Dependencies (2)

- [jsdom](https://npm.io/package/jsdom.md) ^11.7.0
- [request](https://npm.io/package/request.md) ^2.85.0

## Recent versions

- 1.1.0 (latest) — 2018-08-03
- 1.0.2 — 2018-04-21
- 1.0.1 — 2018-04-16
- 1.0.0 — 2018-04-13

## README

# mini-scrape

[![npm version](https://badge.fury.io/js/mini-scrape.svg)](https://badge.fury.io/js/mini-scrape)

simple scrape function working only nodejs

## Installation

```
$ npm install mini-scrape
```

or yarn

```
$ yarn install mini-scrape
```

## Example

```js
const scrape = require('mini-scrape')
const url = 'https://github.com/mottox2/mini-scrape'

scrape(url).then(window => {
  console.log('title: ', window.document.title)
  console.log('h1: ', window.document.querySelector('h1').textContent.replace(/\n/g, ''))
})
```

**webpack**

```js
import scrape from 'mini-scrape'
const url = 'https://github.com/mottox2/mini-scrape'

scrape(url).then(window => {
  console.log('title: ', window.document.title)
  console.log('h1: ', window.document.querySelector('h1').textContent.replace(/\n/g, ''))
})
```

with headers

```js
import scrape from 'mini-scrape'
const url = 'https://github.com/mottox2/mini-scrape'

scrape(url, {
  headers: {
    'User-Agent': 'mini-scrape'
  }
}).then(window => {
  console.log('title: ', window.document.title)
  console.log('h1: ', window.document.querySelector('h1').textContent.replace(/\n/g, ''))
})
```

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