# node-scraper-to-text

> Scrape a bunch of URLs for tags, get an array of strings back

Latest version **1.0.4** (published 2017-10-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-scraper-to-text
pnpm add node-scraper-to-text
yarn add node-scraper-to-text
bun add node-scraper-to-text
```

Provides the command `nodeScraperToText`.

## 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.0.4 |
| Published | 2017-10-11 |
| First published | 2017-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.3 |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sean Scanlan |
| Maintainers | skiprox |

## Links

- npm: https://www.npmjs.com/package/node-scraper-to-text
- Repository: https://github.com/skiprox/node-scraper-to-text
- Issues: https://github.com/skiprox/node-scraper-to-text/issues
- npm.io page: https://npm.io/package/node-scraper-to-text

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.2
- [request](https://npm.io/package/request.md) ^2.81.0

## Recent versions

- 1.0.4 (latest) — 2017-10-11
- 1.0.3 — 2017-10-10
- 1.0.2 — 2017-10-10
- 1.0.1 — 2017-10-10
- 1.0.0 — 2017-08-31

## README

# Node Scraper to Text
> Scrape a bunch of URLs for tags, get an array of strings back

This is to be run server side, not client side. Do it to pull down some fun text from websites, to use in twitter bots or wherever.

## Installation
Install via npm:

```sh
$ npm i node-scraper-to-text --save
```

## Usage
As a module:

```js
const NodeScraperToText = require('node-scraper-to-text');
const options = {};
const nodeScraperToText = new NodeScraperToText(options);
```

You can pass in some actual options, too :)

```js
const NodeScraperToText = require('node-scraper-to-text');
const options = {
	shouldSplit: true,
	urls: ['https://reddit.com'],
	tags: ['a.title']
};
const nodeScraperToText = new NodeScraperToText(options);
```

## Options

Instantiation options.

* `@param {boolean} shouldSplit` - Whether to split the text by periods or not.
* `@param {array} urls` - An array of URL strings
* `@param {array} tags` - An array of tag strings (jQuery type strings, they will be searched like `$(tag)`)
* `@param {Boolean | String} save` - Whether to save the file (pass a location for the file if you want it to save, e.g. "./my-dumb-file.js"). Will save the file as `module.exports = {"sentences": [... your scraped sentences array]}`

## Issues

If you notice anything wrong, or want me to add something, feel free to file an issue [here](https://github.com/skiprox/node-scraper-to-text/issues).

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