extract-main-text

Automatically grab the main text out of a webpage

Usage no npm install needed!

<script type="module">
  import extractMainText from 'https://cdn.skypack.dev/extract-main-text';
</script>

README

extract-main-text-node

Ported from mono0x/extractcontent.

Installing

npm install extract-main-text

Usage

var BodyExtractor = require('extract-main-text');
var extractor = new BodyExtractor({
    url: 'http://***.com/'
  });
extractor.analyze()
  .then(function(text) {
    console.log(extractor.title);
    console.log(extractor.mainText);
  });

License

The BSD license