Basketballcrawler
DEFUNCT - This is a python module to scrape basketball-reference.com and convert various stats into usable data structures for analysis
Install / Use
/learn @andrewgiessel/BasketballcrawlerREADME
basketballcrawler
This is a python module to scrape basketball-reference.com and convert various stats into usable data structures for analysis.
Here is a link to a sample IPython Notebook file demonstrating the library.
Requirements
- Beautiful Soup >= 4.0
- pandas >= 0.11
- request >= 2.0
Usage
Still developing the API. Right now you can get a list of all player overview urls, generate a list of game log urls for a given player, and convert that list into pandas dataframe.
Notes
players.json was generated on 02/11/2016 by buildPlayerDictionary() and savePlayerDictionary().
I'd recommend building your own, fresh copy. It takes about 10 minutes to scrape from the site.
To create the most recent players.json, you can use as follows.
import basketballCrawler as bc
players = bc.buildPlayerDictionary()
bc.savePlayerDictionary(players, '/path/to/file')
You can also download generated players.json. However, note that it's a pretty large (13M) file.
players = bc.loadPlayerDictionary('/path/to/players.json')
In order to search player name, use searchForName function, for example,
searched_player = bc.searchForName(players, 'Murphey') # players is player dictionary
TODO
- Local Database construction.
- League-wide statistics.
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
