diff --git a/lib/overwatch.js b/lib/overwatch.js index f0abd6f..df71f24 100644 --- a/lib/overwatch.js +++ b/lib/overwatch.js @@ -166,7 +166,7 @@ let OverwatchProvider = function () { stats[item.find('.card-copy').text().sanitize()] = item.find('.card-heading').text().cast(); }); - stats.masteringHeroe = $('#overview-section > .masthead-hero-image').attr(`data-hero-${gameType}`); + stats.masteringHeroe = $('[data-js="heroMastheadImage"]').attr(`data-hero-${gameType}`); return stats; } @@ -174,13 +174,16 @@ let OverwatchProvider = function () { let parseHeroesStats = ($, gametype, overallOnly = false) => { var heroesMap = []; var stats = {}; + stats[gametype] = {}; + + //// Master stats _.each($(`#${gametype} > .career-stats-section option`), (item) => { heroesMap.push({ name: item.attribs['option-id'].toLowerCase().sanitize(), value: item.attribs['value'] }); if (overallOnly) return false; }); - + //// Seeking heroe datas _.each(heroesMap, (map) => { stats[map.name] = {};