https://github.com/robertjgabriel/html-to-array
Scrap a html page and convert all text on the page into an array.
https://github.com/robertjgabriel/html-to-array
array daviddm-url html scrap travis-url
Last synced: about 1 year ago
JSON representation
Scrap a html page and convert all text on the page into an array.
- Host: GitHub
- URL: https://github.com/robertjgabriel/html-to-array
- Owner: RobertJGabriel
- License: other
- Created: 2018-11-17T04:02:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-17T05:04:11.000Z (over 7 years ago)
- Last Synced: 2025-03-24T03:01:54.250Z (about 1 year ago)
- Topics: array, daviddm-url, html, scrap, travis-url
- Language: JavaScript
- Size: 58.6 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# html-to-array [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url]
> Scrap a html page and convert all text on the page into an array.
## Installation
```sh
$ npm install --save html-to-array
```
## Usage
```js
const HTML_TO_ARRAY = require('html-to-array');
const URL = 'https://www.robertgabriel.ninja';
HTML_TO_ARRAY.scrap(URL).then(data =>)
;
// Returns an object
/*
let object = {
message: 'success',
sentences: ['Robert gabriel is cool', 'Here is sentece two']
};
*/
// Error
/*
let object = {
message: 'error',
sentences: []
};
*/
```
## License
Apache-2.0 © [Robert James Gabriel](https://www.robertgabriel.ninja)
[npm-image]: https://badge.fury.io/js/html-to-array.svg
[npm-url]: https://npmjs.org/package/html-to-array
[travis-image]: https://travis-ci.org/RobertJGabriel/html-to-array.svg?branch=master
[travis-url]: https://travis-ci.org/RobertJGabriel/html-to-array
[daviddm-image]: https://david-dm.org/RobertJGabriel/html-to-array.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/RobertJGabriel/html-to-array
[coveralls-image]: https://coveralls.io/repos/RobertJGabriel/html-to-array/badge.svg
[coveralls-url]: https://coveralls.io/r/RobertJGabriel/html-to-array