A Python web scraper built to display the score of current and recently finished NHL games. The score is scraped directly from the NHL website every 30 seconds.
- Python 3.6+
python3 --version
(It actually works just as well with Python 2, you'd just need to remove the
3
from all the commands provided in (a) this README and (b)requirements.txt
)
Additional requirements can be installed with pip - there is a requirements.txt
file provided that allows you to simply run pip3 install -r requirements.txt
. Included in this file are the following packages:
Once you've ensured that your system meets the requirements, open a terminal window and execute
python3 your/path/to/ticker.py
- NHL livescore JSON:
- http://live.nhle.com/GameData/RegularSeasonScoreboardv3.jsonp (old one)
- https://statsapi.web.nhl.com/api/v1/schedule (much richer "new" one, will move to this in future)
In future, I plan to support other leagues, likely starting with MLB:
-
MLB livescore JSON:
-
Edit (2018 season):
- Individual game boxscore: http://statsapi.mlb.com:80/api/v1/game/game_pk/boxscore
- full list of MLB APIs: http://statsapi.mlb.com/docs/
Copyright 2016 John Freed and Stevie Howard.