0.0.2 • Published 10 years ago

co-node-read v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

co-node-read

co wrapper for node-read

Usage

read(html [, options])

Where

  • html url or html code.
  • options is an optional options object

Example

var co = require('co');

var read = require('./index');

co(function * () {

  var article = yield read('http://news.163.com/14/0905/18/A5DA5S6N00014SEH.html');

  // Main Article.
  console.log(article.content);

  // Title
  console.log(article.title);

  // HTML 
  console.log(article.html);

  // DOM
  console.log(article.dom);

})();

LISENCE

MIT

0.0.2

10 years ago

0.0.1

10 years ago