Exemplo n.º 1
0
def main():

    dbName = 'stubhub_NFL2015.sqlite'
    # dbi = DbInitializer(dbName)
    # dbi.init_table('stats')

    for team in teamsNFL:
        ds = Datascraper(team, '2016-01-05T01:59')
        ds.writeListingsAll(mode='both', dbName='stubhub_NFL2015.sqlite')
Exemplo n.º 2
0
def main(league, mode):

    if (league not in ('NFL2015Reg',)) or (
            mode not in ('db', 'file', 'both')):

        logging.error("Invalid arguments (\'%s\', \'%s\'')" % (league, mode))
        print "Invalid arguments (\'%s\', \'%s\'')" % (league, mode)
        return

    if league == 'NFL2015Reg':
        dbName = 'stubhub_NFL2015.sqlite'
        teamList = teamsNFL
        dateTo = '2016-01-05T01:59'
        # dbi = DbInitializer(dbName)
        # dbi.init_table('stats')

    for team in teamList:
        ds = Datascraper(team, dateTo)
        ds.writeListingsAll(mode=mode, dbName=dbName)