html-article-extractor icon indicating copy to clipboard operation
html-article-extractor copied to clipboard

A web page content extractor

html-article-extractor

A web page content extractor for News websites

installation

npm install html-article-extractor

usage

var htmlArticleExtractor = require("html-article-extractor");

var dom = new JSDOM("...");
var body = dom.window.document.body
result = htmlArticleExtractor(body);
console.log(result)

Outputs:

{
    html: '<div>contents</div>',
    text: 'contents'
}

example

git clone https://github.com/jungyoun/html-article-extractor
cd html-article-extractor
npm install
node example/crawler.js

demo

https://online-article-extractor.herokuapp.com/