Permalink
Browse files

Added high-level scrape example

  • Loading branch information...
1 parent 0cbbfcf commit be339bf5cce882f6e90e20bb4880fc7e8e88044c @chriso chriso committed Jan 6, 2011
Showing with 19 additions and 1 deletion.
  1. +19 −1 README.md
View
@@ -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

0 comments on commit be339bf

Please sign in to comment.