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.

Installation

Install using pip.

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.

import webscraper

#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.0.tar.gz (4.5 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.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for basketball_ref_webscraper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f2b64f53d54c3af86d0081f03abc4d0d8fddfedf8dc96708244ecbf8d9e0d33e
MD5 50ad4a763f9a007763c4158c87479d82
BLAKE2b-256 9c611eedc5010e0cc7bb782198351dd6ceebb2562b43e966f0f3075a6aa29674

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for basketball_ref_webscraper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b49b1c933a8ea26df08083a6bf3f69a3039de4d5ac97600484d2fa3ef326325
MD5 406618a433dd28afe618bd4a7e44c4e6
BLAKE2b-256 913c984cf6af6a932c5a07078bcdd4e172f73b844f6fbdad0f629f9c5462dba5

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