Webscraper for Basketball Reference
Project description
Basketball Reference Scraper
Lightweight Python library for scraping NBA game data, box scores, rosters, injury reports, and schedules from basketball-reference.com. It provides simple, structured functions for accessing NBA season data without needing to manually parse HTML or handle rate-limiting.
Usage
This was originally a module in a school project. I created the web scraper to collect data to train an AI model to predict NBA match outcomes. I thought it would a cool first PyPi package.
from basketball_ref_webscraper import *
#print(get_all_schedule(2005)) # Returns list of every planned match in the year's season.
print(get_roster('SAS', 2005)) # Returns all player's stats.
print(get_injury_report('SAS', 2026)) # Returns playerid of injured players.
matches = get_team_schedule('SAS', 2005) # Returns list of every planned match for a particular team in the year's season.
print(get_boxscore(matches[0].match_link)) # Returns all basic boxscore stats.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file basketball_ref_webscraper-0.1.1.tar.gz.
File metadata
- Download URL: basketball_ref_webscraper-0.1.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3b868745413681a62648e65d9bcab98869005243dc76f9fe52debdec678b5cf
|
|
| MD5 |
94c9087a473ab55a65f74bad1e9b4026
|
|
| BLAKE2b-256 |
3e883eb95719c3ecbcb0c6e5417afc3ce863e4c43e3b48ef0badecea866095bc
|
File details
Details for the file basketball_ref_webscraper-0.1.1-py3-none-any.whl.
File metadata
- Download URL: basketball_ref_webscraper-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be5214cbdfe7534428e1a010164f2a33f28e9c8aa28bc26e43c8707cf59a9930
|
|
| MD5 |
4e6305f37242219fd90ac1f33a514d07
|
|
| BLAKE2b-256 |
3565b283111a147b990724ad4f86af6dec70097be2939f5d5c40ee371395fba5
|