npm.io
0.1.2 • Published 11 years agoCLI

text-scraper

Licence
MIT
Version
0.1.2
Deps
3
Vulns
1
Weekly
0

text-scraper

A tool for easy scraping of text content from HTML documents of arbitrary encoding.

Installation

npm install text-scraper
# or if you only need the shell command:
npm install -g text-scraper

Usage

Node:

var textScraper = require('text-scraper');

textScraper.scrapeURL('http://www.bbc.co.uk', function(err, res) {
  console.log(res);
});
// or

var document = new Buffer('<h1>text</h1>', 'binary');
textScraper.scrape(document, 'text/html');

Command line:

text-scraper 'http://en.wikipedia.org'
License

The code is available under MIT license.

Keywords