Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

basketball_ref_webscraper-0.1.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

basketball_ref_webscraper-0.1.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file basketball_ref_webscraper-0.1.1.tar.gz.

File metadata

File hashes

Hashes for basketball_ref_webscraper-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e3b868745413681a62648e65d9bcab98869005243dc76f9fe52debdec678b5cf
MD5 94c9087a473ab55a65f74bad1e9b4026
BLAKE2b-256 3e883eb95719c3ecbcb0c6e5417afc3ce863e4c43e3b48ef0badecea866095bc

See more details on using hashes here.

File details

Details for the file basketball_ref_webscraper-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for basketball_ref_webscraper-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 be5214cbdfe7534428e1a010164f2a33f28e9c8aa28bc26e43c8707cf59a9930
MD5 4e6305f37242219fd90ac1f33a514d07
BLAKE2b-256 3565b283111a147b990724ad4f86af6dec70097be2939f5d5c40ee371395fba5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page