Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added high-level scrape example

  • Loading branch information...
commit be339bf5cce882f6e90e20bb4880fc7e8e88044c 1 parent 0cbbfcf
@chriso authored
Showing with 19 additions and 1 deletion.
  1. +19 −1 README.md
View
20 README.md
@@ -9,7 +9,25 @@
Follow [@nodeio](http://twitter.com/nodeio) for updates.
-## Example
+## Scrape example
+
+Let's pull the front page storied from reddit using the high-level scrape() method.
+
+ require('node.io').scrape(function() {
+ var self = this;
+ this.getHtml('http://www.reddit.com/', function(err, $) {
+ if (err) {
+ self.exit(err);
+ } else {
+ $('a.title').each(function(title) {
+ console.log(title.text);
+ });
+ self.skip();
+ }
+ });
+ });
+
+## Built-in module example
Find the pagerank of a domain
Please sign in to comment.
Something went wrong with that request. Please try again.