I\'m trying to extract email info from HTML files in my hard drive.
If I load the file in firefox and run jQuerify bookmarklet I can use successfully the following selec
It's tough to use jquery with node.js but it's possible. Here's an implementation with jsdom:
var jsdom = require('jsdom').jsdom,
sys = require('sys'),
window = jsdom().createWindow();
jsdom.jQueryify(window, '/path/to/jquery.js', function (window, jquery) {
window.jQuery('body').append("Hello World");
sys.puts(window.jQuery(".testing").text()); // outputs Hello World
});
For more info see:
http://blog.nodejitsu.com/jsdom-jquery-in-5-lines-on-nodejs
or:
Can I use jQuery with Node.js?