flea-killer
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -44,5 +44,5 @@ // League scraper | ||
slots: { | ||
total: $('.league-standings .user-name').length + $('.league-standings a.btn-success').length, | ||
available: $('.league-standings a.btn-success').length, | ||
taken: $('.league-standings .user-name').length | ||
total: $('.table-group .user-name').length + $('.table-group a.btn-success').length, | ||
available: $('.table-group a.btn-success').length, | ||
taken: $('.table-group .user-name').length | ||
}, | ||
@@ -54,3 +54,3 @@ teams: [], | ||
// Teams in the league | ||
$('.league-standings tr:nth-child(2) th .tt-content').each(function() { | ||
$('.table-group tr:nth-child(2) th .tt-content').each(function() { | ||
league.stats.push($(this).text()); | ||
@@ -60,3 +60,3 @@ }); | ||
// cheerio bug is forces it unable to find tbody for some odd reason | ||
for (var i = 0, l = $('.league-standings .user-name').length; i < l; i++) { | ||
for (var i = 0, l = $('.table-group .user-name').length; i < l; i++) { | ||
$('#row_0_0_' + i).each(function() { | ||
@@ -63,0 +63,0 @@ // Only take real teams |
{ | ||
"name": "flea-killer", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Fleaflicker Baseball API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -64,8 +64,8 @@ var expect = require('chai').expect, | ||
// Cant test individual stats that well | ||
expect(league.teams[0].stats.HR.points).to.equal(10); | ||
expect(league.teams[0].stats.HR.value).to.equal(100); | ||
expect(league.teams[0].stats.ERA.value).to.equal(3.95); | ||
expect(league.teams[0].stats.ERA.points).to.equal(3); | ||
expect(league.teams[0].stats.QS.value).to.equal(56); | ||
expect(league.teams[0].stats.QS.points).to.equal(9); | ||
expect(league.teams[0].stats.HR.points).to.equal(9); | ||
expect(league.teams[0].stats.HR.value).to.equal(204); | ||
expect(league.teams[0].stats.ERA.value).to.equal(3.81); | ||
expect(league.teams[0].stats.ERA.points).to.equal(6); | ||
expect(league.teams[0].stats.QS.value).to.equal(99); | ||
expect(league.teams[0].stats.QS.points).to.equal(7.5); | ||
done(); | ||
@@ -72,0 +72,0 @@ }); |
23281