co-node-read
co wrapper for node-read
Last updated 3 years ago by littlehaker .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install co-node-read 
SYNC missed versions from official npm registry.

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

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |