Skip to content

Scrapes NFL box score data from pro football reference to JSON format. Written in node.js using puppeteer headless chrome browser.

License

Notifications You must be signed in to change notification settings

bradforj287/NFLBoxScoreScraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NFL Box Score Web Scraper

A web scraper that will download box scores from http://www.profootballreference.com into JSON format. It will download all box scores and player data. Please refer to arguments.json to set program parameters. Useful for fantasy football analytics.

##Requirements:

  • Node.js version 8.4 or higher

##Program Usage:

npm install
npm start

##Program Arguments (set in arguments.json):

  • minNflYear - the earliest NFL year to scrape
  • maxNflYear - the maximum NFL year to scrape

JSON schema examples

Player

{
"playerLink": "/players/A/AbduAm00.htm",
"position": "RB",
"birthday": "1993-06-13",
"name": "ameer abdullah"
}

Game Summaries for NFL year

[
{
 "seasonYear": "2015",
 "week": "1",
 "day": "Thu",
 "date": "2015-09-10",
 "boxScoreLink": "/boxscores/201509100nwe.htm",
 "winningTeam": "New England Patriots",
 "isWinningTeamHome": true,
 "losingTeam": "Pittsburgh Steelers",
 "wtPoints": "28",
 "ltPoints": "21",
 "wtYards": "361",
 "wtTurnovers": "0",
 "ltYards": "464",
 "ltTurnovers": "1"
} ...
]

Box Score

{
"boxScoreLink": "/boxscores/201509130crd.htm",
"playerStatsList": [
 {
   "playerLink": "/players/B/BreeDr00.htm",
   "playerName": "drew brees",
   "team": "NOR",
   "passing": {
     "completions": "30",
     "attempts": "48",
     "yards": "355",
     "td": "1",
     "int": "1",
     "longest": "63"
   },
   "rushing": {
     "attempts": "1",
     "yards": "3",
     "td": "0",
     "longest": "3"
   },
   "receiving": {
     "receptions": "",
     "yards": "",
     "td": "",
     "longest": "",
     "targets": ""
   }
 }...]
}

About

Scrapes NFL box score data from pro football reference to JSON format. Written in node.js using puppeteer headless chrome browser.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •