# qd-scraper

> Quick and dirty way to scrape specific html tags from a website for text data.

Latest version **1.0.4** (published 2022-09-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install qd-scraper
pnpm add qd-scraper
yarn add qd-scraper
bun add qd-scraper
```

## 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 | 2022-09-08 |
| First published | 2022-09-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ben Lazzeroni |
| Maintainers | benlazzero |
| Keywords | scrape, parse, html, grab |

## Links

- npm: https://www.npmjs.com/package/qd-scraper
- npm.io page: https://npm.io/package/qd-scraper

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2022-09-08
- 1.0.3 — 2022-09-08
- 1.0.2 — 2022-09-08
- 1.0.1 — 2022-09-08
- 1.0.0 — 2022-09-07

## README

<p align="center">
  <img src="https://github.com/benlazzero/Quick-Dirty-Scrape/blob/main/logo.png?raw=true">
</p>

------------------------------------
`https://github.com/benlazzero/Quick-Dirty-Scrape`

For scraping website text data quick and dirty.

Proabaly not the most accurate scraper/parser one-liner, however it's very simple to use and most often returns useable results.

QDScraper boasts zero 3rd-party dependencies by making use of the nodejs https library. This package will most likely DOA.. 
However I will merge all pulls that pass tests, simplify the code, and add accuracy.

### NPM Installation
`WARNING: NODE >= 16.17.0` 

```bash
cd your-root-dir
npm install qd-scraper 
```

### Example

```javascript
var qdScraper = require("qd-scraper")

const scrapeSite = async() => {
  let ArrayOfData = await qdScraper('https://website.com/', 'div');
  console.log(ArrayOfData);
}
 
scrapeSite(); // ['text from first div', 'text from second div'...]
```

### Behavior 

`NOTE: Returns a promise`

On success the scraper will return an array of strings containing the text in between the tag specified.

On failure the scraper will return an empty array. Could be the case when the url is bad or tag is not found.

If a tag is not specified as a parameter the scraper will default to a `<li>` tag.

### Build 

```bash
git clone https://github.com/benlazzero/Quick-Dirty-Scrape
cd Quick-Dirty-Scrape
npm install
```

Running tests with Jest
```bash
npm test 
```

Running the example file (uses nodemon to restart on saves)
```bash
npm start
```

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