A Python HTTP/JSON script to display the score of today's NHL hockey games. When run in persistent mode, information is downloaded directly from the NHL website every 20 seconds.
-
Linux machine (not yet Windows compatible)
-
python3 --version
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:
usage: ./ticker.py [-h] [-p]
optional arguments:
-h, --help show this help message and exit
-p, --persist live-update scores on persistent scoreboard
Once you've installed the requirements (pip3 install -r requirements.txt
), permit the script to execute:
chmod u+x ticker.py
Then run the script:
./ticker.py
This will run the script once, simply outputting the current scores.
If you wish to run the script persistently and have the scores auto-update every 20 seconds, add the --persist
flag:
./ticker.py -p
To quit, press Q
. Alternatively, Ctrl-C
works as well (but try to avoid this if you can).
IMPORTANT: All game times are displayed in PST.
- NHL livescore JSON (There is a newer API, but I'm too lazy to change this fork over.)
Copyright 2019 Greg Hennis, Stevie Howard.