1.0.0 • Published 9 years ago

hltv-match v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

hltv-match

Parse HLTV match page.

Example

var hltvMatch = require('hltv-match');

var url = 'http://www.hltv.org/?pageid=188&matchid=18745&eventid=0&gameid=2';

hltvMatch(url, function(error, data) {
  if (error) {
    throw error;
  }

  console.log(data);
  // => {
  // =>   map: 'mirage',
  // =>   event: 'ESEA Invite Season 17 Global Finals',
  // =>   homeScore: 16,
  // =>   awayScore: 12,
  // =>   home: 'mousesports',
  // =>   away: 'Cloud9'
  // => }
});

Installation

$ npm install hltv-match

API

var hltvMatch = require('hltv-match');

hltvMatch(url, callback)

Parses the match at String url and calls callback(error, data), where error is any Error encounted and data is an Object populated with the parsed data.