Created
July 18, 2012 14:38
-
-
Save robertkowalski/3136566 to your computer and use it in GitHub Desktop.
node.io scraper for my blog
This file contains 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
var nodeio = require('node.io'), | |
options = {timeout: 10}; | |
exports.job = new nodeio.Job(options, { | |
input: false, | |
run: function (keyword) { | |
this.getHtml('http://robert-kowalski.de', function (err, $) { | |
var titles = []; | |
$('h1.entry-title') | |
.each(function(element) { | |
titles.push(element.children[0].children[0].data); | |
}); | |
this.emit(titles) ; | |
}); | |
} | |
}); |
Author
robertkowalski
commented
Jul 18, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment