Skip to content

DebanilBora/NBA-Stats-Scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NBA Stats Scraper 🏀

A Python-based web scraper that collects NBA player statistics from Basketball-Reference for multiple seasons and stat types.
This project demonstrates web scraping with Playwright, data extraction with BeautifulSoup, and data handling with pandas.


Features

  • Scrapes per game, totals, and advanced stats for multiple NBA seasons.
  • Handles different table structures (commented tables, direct tables, and new advanced stats table IDs).
  • Retries failed requests up to 3 times for robust scraping.
  • Progress bar with tqdm to track scraping progress.
  • Saves all data to a CSV file (nba_stats.csv) for further analysis.
  • Future-proof pandas.read_html implementation to avoid warnings.

Technologies Used


About

Python scraper for NBA player stats (per game, totals, advanced) with Playwright and pandas

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages