#!/usr/bin/python import sqlite3 from StatsClass import NcaaGrabber stats = NcaaGrabber() #teams = stats.getTeams('fcs', 2008) # teams.update(stats.getTeams('fbs', 2008)) # for team in teams: # print("[%s], [%s]" % (team, teams[team])) numWeeks = stats.getNumWeeks('fbs', 2011) print("Num weeks: " + str(numWeeks)) for week in range(1,numWeeks+1): isHome = stats.isHomeGame(8, 2011, week) print(isHome) # myStats = stats.getStats(8, 2011, 1) # print(myStats) # print("\n") #sched = stats.processWeekly('fbs', 2008, 1, teams) #print(sched)
years = [2012] for year in years: teams = statsGrabber.getTeams('fcs', year) teams.update(statsGrabber.getTeams('fbs', year)) # Insert the teams for team in teams: insertTeam(cursor, year, teams[team], team) conn.commit() divisions = ['fcs', 'fbs'] for div in divisions: numWeeks = statsGrabber.getNumWeeks(div, year) # Build the week's schedule for week in range(1, numWeeks+1): print("In week %d..." % week) schedule = statsGrabber.processWeekly(div, year, week, teams) for game in schedule: team1 = game[0] team2 = game[1] score = game[2] scoreArr = score.split("-")