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.
Metadata
Release files for basketball-ref-webscraper 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| basketball_ref_webscraper-0.1.2.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| basketball_ref_webscraper-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.8 kB
Release files / basketball_ref_webscraper-0.1.2.tar.gz
| Download URL | basketball_ref_webscraper-0.1.2.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d52c804ee000949140ebe77128bfd5942974afe349a3c53c11ed64284564de18
|
|
BLAKE2b-256 checksum How to use checksums |
70cff99fa17ec2d6f9ab105f7a08109e924710f4ae4628e3dae4561833aea07c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / basketball_ref_webscraper-0.1.2-py3-none-any.whl
| Download URL | basketball_ref_webscraper-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45924e44ee70cdb1d340c01cfc5d75483669ed12da5b747d905163487dcca629
|
|
BLAKE2b-256 checksum How to use checksums |
3f9aed707212963307a292973d867430bf124b98c42594d08c96372505f21419
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|