I gathered all the match data for the NA and EU LCS, Promotion Tournaments, and Playoffs using the following jQuery:
$ = jQuery;
var clipboard = [''];
week = $('.current-week').text();
var gametitle = $(location).attr('href').split("/");
$('.inset.row.toggle-hide.ng-scope').each( function() {
// Get Link
var href = $(this).find('.match-link').attr('href').split("/");
var link = href.pop();
// Get Time
var time = $(this).find('.program-time.region-hide.na-time.ng-binding').text()
// Get Teams
var teamA = $(this).find('.team-name').eq(0).text();
var teamB = $(this).find('.team-name').eq(1).text();
// Get Winner
if ($(this).find('.team-1.winner').length == 1)
{
var resultA = 1;
var resultB = 0;
}
else
{
var resultA = 0;
var resultB = 1;
}
// Get Percentages
var winA = $(this).find('.pds-feedback-per').eq(0).text();
var winB = $(this).find('.pds-feedback-per').eq(1).text();
// Set Header
var header = gametitle[3] + ',' + gametitle[4] + ',' + gametitle[5] + ',' + week + ',' + link + ',' + time + ','
// Print to Log
var output = header + 'blue,' + $.trim(teamA) + ',' + resultA + ',' + winA + String.fromCharCode(13) + ',' + header + 'red,' + $.trim(teamB) + ',' + resultB + ',' + winB + String.fromCharCode(13);
clipboard.push(output);
})
copy(clipboard);
This code will work in Chrome (where the 'copy' command is usable) and for any page. If you haven't voted on the matches, it will not return the fan vote percentage. You also need to wait for the page to completely load or else it will spit out an error. This can likely be automated using phantomjs or the equivalent, but I just did it manually as there are only something like 44 different pages to go through which is easier than setting up the test environment for the time being.
Times should not be trusted, they seem to be auto-adjusted, and there is no base datetime information to grab to confirm. That information can be grabbed from the individual match pages, but that is a different can of worms.
$ = jQuery;
var clipboard = [''];
week = $('.current-week').text();
$('.inset.row.toggle-hide.ng-scope').each( function() {
// Get Link
var href = $(this).find('.match-link').attr('href').split("/");
var link = href.pop();
// Get Time
var time = $(this).find('.program-time.region-hide.na-time.ng-binding').text()
// Get Teams
var teamA = $(this).find('.team-name').eq(0).text();
var teamB = $(this).find('.team-name').eq(1).text();
// Get Winner
if ($(this).find('.team-1.winner').length == 1)
{
var winner = 'W, L'
}
else
{
var winner = 'L, W'
}
// Get Percentages
var winA = $(this).find('.pds-feedback-per').eq(0).text();
var winB = $(this).find('.pds-feedback-per').eq(1).text();
// Print to Log
var output = week + ',' + link + ',' + time + ',' + $.trim(teamA) + ',' + $.trim(teamB) + ',' + winner + ',' + winA + ',' + winB + String.fromCharCode(13);
clipboard.push(output);
})
copy(clipboard);
The code above will return each match on its own line which is good for looking at match-based data, but much more difficult when trying to sum up team records or the like.
The results of both scripts on everything from the 2013 Spring Split to the 2014 Promotion Tournament are located in the below spreadsheet: