Created
November 4, 2015 15:39
-
-
Save mlms13/ec79757be30729337524 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get names and ratings for BFZ cards from ChannelFireball | |
function getRatings() { | |
var list = [].slice.apply($('.postContent h1').not(":first").not(":last")); | |
return list.map(function(el) { | |
var rating = $(el).next().next().clone().find("b").remove().end().text() | |
return { | |
name: el.textContent, | |
rating: parseFloat(rating) | |
}; | |
}); | |
} | |
getRatings(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment