Metadata-Version: 2.1
Name: basketball-reference-scraper
Version: 1.0.1
Summary: A Python client for scraping stats and data from Basketball Reference
Home-page: https://github.com/vishaalagartha/basketball_reference_scraper
Author: Vishaal Agartha
Author-email: vishaalagartha@gmail.com
License: MIT
Keywords: nba,sports,data mining,basketball,basketball reference,basketball-reference.com
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: beautifulsoup4 (==4.8.2)
Requires-Dist: bs4 (==0.0.1)
Requires-Dist: lxml (==4.4.2)
Requires-Dist: numpy (==1.18.1)
Requires-Dist: pandas (==0.25.3)
Requires-Dist: python-dateutil (==2.8.1)
Requires-Dist: pytz (==2019.3)
Requires-Dist: requests (==2.22.0)
Requires-Dist: six (==1.13.0)
Requires-Dist: soupsieve (==1.9.5)
Provides-Extra: test
Requires-Dist: unittest ; extra == 'test'

# basketball_reference_scraper

[Basketball Reference](https://www.basketball-reference.com/) 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
```

If you're getting issues installing the dependencies listed in the `install_requires` or `requirements.txt` files. Try installing them manually via these commands:
```
python -m pip install pandas
python -m pip install bs4
python -m pip install lxml
```

This is caused by an ongoing issue with pip.

### 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](https://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](https://www.basketball-reference.com/) 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).


