https://github.com/kingcitaldo125/mlbscores
Download the MLB scores for a day
https://github.com/kingcitaldo125/mlbscores
api-client baseball-reference games-played mlb-game regular-expression scores-api
Last synced: 10 months ago
JSON representation
Download the MLB scores for a day
- Host: GitHub
- URL: https://github.com/kingcitaldo125/mlbscores
- Owner: Kingcitaldo125
- License: mit
- Created: 2019-05-04T20:32:28.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-09-29T22:53:32.000Z (over 3 years ago)
- Last Synced: 2023-03-07T21:39:17.617Z (over 3 years ago)
- Topics: api-client, baseball-reference, games-played, mlb-game, regular-expression, scores-api
- Language: Python
- Homepage:
- Size: 63.5 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MLB Game Results (MLBScores)
## Get the results from any regular season MLB game in MLB history (1871 onwards)
Special thanks to [Baseball Reference](https://www.baseball-reference.com/), which has a de-facto API that makes this possible.
This is essentially a [MUD](https://en.wikipedia.org/wiki/MUD) based on the [boxscores](https://www.baseball-reference.com/boxes/) for Baseball Reference.
## Usage
Follow the command prompt guide for the `download.bat` script like so:
```
**************************************
Select an Option Below:
1:Get yesterday's scores
2:Get tomorrow's scores (coming soon)
3:Get scores for a particular date
4:Exit
**************************************
```
For option ``3``, this can be entered like so:
```
Enter in Year
2001
Enter in Month
4
Enter in Day
1
```
Which will result in:
```
Scores for 200141:
Date Apr 01 2001
```
with a gamelist for all games played.
If there were no games played for that day, it will report:
```
GameList: 0
No Games Were or Have Yet Been Played on This Date
```
### JSON Results
To get the games/scores for a day in JSON format, change the `do_export_json` variable to `True` in the `download.py` file.
Game results will be written to disk after the program finishes parsing game information for a particular date.