A scraping library that gets you basketball data for the NBA and WNBA
PLpgSQL Python
Permalink
Failed to load latest commit information.
clean add parsing for shots from new espn design Mar 14, 2016
config adding new identifiers for overtime periods (espn) Mar 3, 2016
extract add parsing for shots from new espn design Mar 14, 2016
load add parsing for shots from new espn design Mar 14, 2016
metadata
schema
source add espn parsing for college bball Mar 13, 2016
tests adding unit tests Nov 16, 2015
README.md Update README.md Oct 12, 2015
__init__.py moving all scraper files up one level, removing default dump folders Sep 25, 2014
build.sh removing dependence on mysql Oct 12, 2015
configg_example.py lets try that again. renmaing db parameter Feb 13, 2015
db.py add parsing for shots from new espn design Mar 14, 2016
findgames.py permalink for games May 5, 2015
findteams.py work to include NCAA mens basketball scraping Feb 13, 2015
league.py
master.py moving all scraper files up one level, removing default dump folders Sep 25, 2014
reporting.py moving all scraper files up one level, removing default dump folders Sep 25, 2014
scrape.py removing find player from clean repo, using player resolution. removi… Nov 4, 2015

README.md

PLAY BY PLAY AND BOX SCORE SCRAPING LIBRARY

Requirements

This library was created on a Mac, so the setup instructions are geared toward a *nix environment (sorry Windows users)

  • Python 2.5 or greater
  • BeautifulSoup4 (pip install beautifulsoup4)
  • lxml (used within BeautifulSoup) (pip install lxml)

Instructions

  • Clone the repository to your local machine (change your_folder_path to whatever folder you want to put the repo)
cd your_folder_path
git clone git@github.com:kpascual/basketball-data-scraper.git
  • Add this new directory to your PYTHONPATH in ~/.bash_profile
PYTHONPATH="/your_folder_path/basketball-data-scraper:$PYTHONPATH"
export PYTHONPATH
  • Run the build.sh script
sh build.sh database_username database_password database_name

To actually do scraping, run the scrape.py file. You will be asked what league you want to run.

python scrape.py