*ORIGINAL AUTHOR: NEIL SEAWARD: https://github.com/sealneaward/template-py/
Purpose
A python project that returns SHOOTOUT results in a single NHL game of a player via a csv file.
Setup - Windows
-
*REFER TO AUTHOR'S INSTRUCTIONS: https://github.com/sealneaward/template-py/blob/master/README.md#windows-setup
-
In the project root folder (SOFE-4620-Assignment-1), run cmd as admin to create a Virtual Environment
pip install virtualenv virtualenvwrapper virtualenv venv venv\Scripts\activate pip install -r requirements.txt deactivate
-
Skip DB installation
-
Install additional modules:
pandas matplotlib requests
pip install pandas
Usage Example
Scrape data for game Tampa vs Philadelphia
home away
attempts 0 0
scores 0 0
Returns shootout results during the game.
*Since it didn't go to shootout, results show 0
Code Instructions to Retrieve Data
-
Open Developer Tools > Network > XHR > pageWithAPIData
-
To retrieve HEADER info to be put on the HEADER function of the application: Refer to the image below:
-
To retrieve data from the API (in this case shootout info): Refer to the image below:
Dates > 0 > games > lineScore > shootoutInfo
-
Run application. Saves automatically to a csv file