Skip to content

Instantly share code, notes, and snippets.

@lsdr
Created December 17, 2018 18:00
Show Gist options
  • Save lsdr/b535a30356387437f38d8e717d6222ce to your computer and use it in GitHub Desktop.
Save lsdr/b535a30356387437f38d8e717d6222ce to your computer and use it in GitHub Desktop.
count IR total among NFL current injuries list
// Pro Football Reference | Current NFL Injuries
// https://www.pro-football-reference.com/players/injuries.htm
var elements = document.getElementById("div_injuries");
var injuries = elements.querySelectorAll("td[data-stat='injury_class']");
var seasonEnding = Array.prototype.slice.call(classes).filter(el => el.textContent == "I-R");
console.log(injuries.length);
console.log(seasonEnding.length);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment