Skip to content

Instantly share code, notes, and snippets.

@paulodiovani
Created August 25, 2014 18:50
Show Gist options
  • Save paulodiovani/dfeea4caaa7ed2ebb049 to your computer and use it in GitHub Desktop.
Save paulodiovani/dfeea4caaa7ed2ebb049 to your computer and use it in GitHub Desktop.
(function() {
'use strict';
var env = require('jsdom').env;
// first argument can be html string, filename, or url
env('http://programmingexcuses.com/', function(err, window) {
if (err) console.error(err);
var $ = require('jquery')(window);
console.log( $('body .wrapper center').text() );
});
})();
@paulodiovani
Copy link
Author

It requires jsdom and jquery.

npm install jsdom jquery

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment