Parse a CS:GO match page from GosuGamers.
GosuGamers provides no API so I have no choice but to download their HTML pages, parse the HTML for important stuff, and parse that stuff into appropriate JavaScript values. With dependencies this module is like 84 kB minified and gzipped which is just ridiculous.
var gosugamersMatch = require('gosugamers-match');
gosugamersMatch('excessively long gosugamers url', function(error, data) {
if (error) {
throw error;
}
console.log(data);
// => {
// => opponent1: 'Team LDLC',
// => opponent2: 'fnatic',
// => score1: 1,
// => score2: 3,
// => date: 1415548800
// => }
});
$ npm install gosugamers-match
var gosugamersMatch = require('gosugamers-match');
Calls callback(error, data)
, where error
is any Error encounted and data
is an Object containing some info on the match described in String url
.