Created
March 20, 2013 21:43
-
-
Save kirkouimet/5208767 to your computer and use it in GitHub Desktop.
Scrape titles from Reddit with node.js and node.io
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('node.io').scrape(function() { | |
this.getHtml('http://www.reddit.com/', function(err, $) { | |
var stories = []; | |
$('.entry .title').each(function(title) { | |
stories.push(title.text); | |
}); | |
this.emit(stories); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment