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.2.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.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for basketball_ref_webscraper-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d52c804ee000949140ebe77128bfd5942974afe349a3c53c11ed64284564de18
MD5 a9c705171ff7e91c03ba1f0ee66b51c7
BLAKE2b-256 70cff99fa17ec2d6f9ab105f7a08109e924710f4ae4628e3dae4561833aea07c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for basketball_ref_webscraper-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 45924e44ee70cdb1d340c01cfc5d75483669ed12da5b747d905163487dcca629
MD5 3d81ad75e27e691faa87e682225b9f85
BLAKE2b-256 3f9aed707212963307a292973d867430bf124b98c42594d08c96372505f21419

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