Scrap a html page and convert all text on the page into an array.
$ npm install --save html-to-array
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: []
};
*/
Apache-2.0 © Robert James Gabriel