Skip to content

Instantly share code, notes, and snippets.

@kirkouimet
Created March 20, 2013 21:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kirkouimet/5208767 to your computer and use it in GitHub Desktop.
Save kirkouimet/5208767 to your computer and use it in GitHub Desktop.
Scrape titles from Reddit with node.js and node.io
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