diff --git a/README.md b/README.md index 3d24420..6727533 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ From npm: "height": "6'1\"", "weight": "170 lbs", "weight_class": "Welterweight", + "image": "", "wins": { "total": 8, "knockouts": 1, diff --git a/lib/sherdog/index.js b/lib/sherdog/index.js index 1c44ceb..2db7595 100644 --- a/lib/sherdog/index.js +++ b/lib/sherdog/index.js @@ -31,6 +31,7 @@ module.exports.getFighter = function(url, callback) { height: "", weight: "", weight_class: "", + image: "", wins: { total: 0, knockouts: 0, @@ -57,6 +58,9 @@ module.exports.getFighter = function(url, callback) { fighter.name = name; fighter.nickname = nickname.replace(/['"]+/g, ''); }); + + //Fighter image + fighter.image=$(".profile_image.photo").attr("src"); // Fighter bio $('.bio').filter(function() { @@ -109,6 +113,7 @@ module.exports.getFighter = function(url, callback) { fighter.losses.knockouts = getTotal(lossesByKnockout); fighter.losses.submissions = getTotal(lossesBySubmission); fighter.losses.decisions = getTotal(lossesByDecision); + fighter.losses.other = getTotal(lossesByOther); }); // Fighter Fight History