Skip to content

Instantly share code, notes, and snippets.

@dongyuwei
Created January 17, 2012 08:42
Show Gist options
  • Save dongyuwei/1625691 to your computer and use it in GitHub Desktop.
Save dongyuwei/1625691 to your computer and use it in GitHub Desktop.
jsdom-test , find github coder's link
var jsdom = require('jsdom'), console = require('console');
jsdom.env({
html: 'https://github.com/popular/forked',
scripts: [
'http://code.jquery.com/jquery-1.5.min.js'
],
done: function(errors, window) {
var $ = window.$;
console.log($('td.title > a').length);
$('td. owner > a').each(function() {
console.log("https://github.com" + $(this).attr('href'));
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment