If you're familiar with jQuery, then node.js (with the plugins "request", "jsdom", and a port of jquery) let's you easily scrape web pages using jQuery in only a few lines.
The below will print a list of the all the questions on stack overflow's homepage to your console:
// Importing required modules
var request = require("request"),
$ = require("jquery");
request({uri: "http://www.stackoverflow.com/"}, function (err, response, body) {
$(body).find("#question-mini-list h3 a").each(function () {
console.log($(this).text());
});
});
Or if you use another javascript framework in the browser, it's not hard creating your own port of MooTools, Prototype or whatever using jsdom for node.js (it's just a matter of wrapping whatever library to provide it with window
, document
and other global variables - which jsdom
gives you access to).