flea-killer
Advanced tools
Comparing version 0.0.4 to 0.1.0
@@ -72,7 +72,8 @@ // League scraper | ||
}; | ||
var row = $(this); | ||
// Push on the stats for the entire team | ||
league.stats.forEach(function(stat, index){ | ||
team.stats[stat] = { | ||
points: $(this).find('td:nth-child(' + (3 * index + 1) + ')').text(), | ||
value: $(this).find('td:nth-child(' + (3 * index + 2) + ')').text().replace(/,/g,'') | ||
points: parseFloat(row.find('td:nth-child(' + (3 * index + 4) + ')').text()), | ||
value: parseFloat(row.find('td:nth-child(' + (3 * index + 5) + ')').text().replace(/,/g,'')) | ||
} | ||
@@ -79,0 +80,0 @@ }); |
{ | ||
"name": "flea-killer", | ||
"version": "0.0.4", | ||
"version": "0.1.0", | ||
"description": "Fleaflicker Baseball API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -49,2 +49,5 @@ var expect = require('chai').expect, | ||
expect(league.id).to.equal(15317); | ||
// Cant test individual stats that well | ||
// expect(league.teams[0].stats.HR.points).to.equal(14); | ||
// expect(league.teams[0].stats.HR.value).to.equal(4); | ||
done(); | ||
@@ -51,0 +54,0 @@ }); |
14030
253
10