Skip to content

Instantly share code, notes, and snippets.

@drewdresser
drewdresser / espn_nba.py
Last active January 9, 2018 01:25
Grabs NBA play-by-play data for a given date range. Example usage: python espn_nba.py 2013-12-24 2013-12-26
from bs4 import BeautifulSoup
from urllib2 import urlopen
from datetime import datetime, timedelta
from time import sleep
import sys
import csv
# CONSTANTS
ESPN_URL = "http://scores.espn.go.com"