Skip to content

Instantly share code, notes, and snippets.

@yefim
Created November 15, 2012 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yefim/4076807 to your computer and use it in GitHub Desktop.
Save yefim/4076807 to your computer and use it in GitHub Desktop.
Simplest scraper
// Count all of the links from the nodejs build page
var jsdom = require("jsdom");
jsdom.env(
"http://nodejs.org/dist/",
["http://code.jquery.com/jquery.js"],
function (errors, window) {
$ = window.$;
console.log("there have been " + $("a").length + " nodejs releases!");
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment