Skip to main content

A Python client for scraping stats and data from Basketball Reference

Project description

basketball_reference_scraper

Basketball Reference is a great resource to aggregate statistics on NBA teams, seasons, players, and games. This package provides methods to acquire data for all these categories in pre-parsed and simplified formats.

Installing

Via pip

I wrote this library as an exercise for creating my first PyPi package. Hopefully, you find it easy to use. Install using the following command:

pip install basketball-reference-scraper

Via GitHub

Alternatively, you can just clone this repo and import the libraries at your own discretion. Note that this means you may have to install additional python packages including requests, asyncio, pandas, and pyppeteer.

Wait, don't scrapers like this already exist?

Yes, scrapers and APIs do exist. The primary API used currently is for stats.nba.com, but the website blocks too many requests, hindering those who want to acquire a lot of data. Additionally, scrapers for Basketball Reference do exist, but none of them load dynamically rendered content. These scrapers can only acquire statically loaded content, preventing those who want statistics in certain formats (for example, Player Advanced Stats Per Game).

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_reference_scraper-0.0.2.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file basketball_reference_scraper-0.0.2.tar.gz.

File metadata

  • Download URL: basketball_reference_scraper-0.0.2.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for basketball_reference_scraper-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f5e9eb409402977ac8c087d3c04f7a322faf3ccfedb80e9daa189422631e8825
MD5 8f8c515d6592b34745e742616e2f1b8b
BLAKE2b-256 705cdb9bd17ef3db40bd4fd4749109cbd8b9410c4efc15a21721218221e05fa8

See more details on using hashes here.

File details

Details for the file basketball_reference_scraper-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: basketball_reference_scraper-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for basketball_reference_scraper-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b6fb3ce1cb2dd24c99a3cee06e63e63e7a2c08f50fcabef445028714a0e47bb9
MD5 140abadacac0f43dce3a94977bafe8a1
BLAKE2b-256 a7ea257cd19c2c592532ac35135edc55afab414720f92a82c0c0b1de9f24871c

See more details on using hashes here.

Supported by

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