示例#1
0
def get_all_data(drop=True):
    """
    runs scraper on all valid CSL schools, getting new player/team data for db

    args:
        drop: if True, drops all tables (for complete db refresh)
    returns:
        nothing
    """

    if drop:
        # drop tables in csl table
        import model
        model.drop_all()

    ids = get_all_schools()

    for id in ids:
        print id
        sys.stdout.flush()
        os.system('python scrape.py %d' % id)
示例#2
0
def get_all_data(drop=True):
    """
    runs scraper on all valid CSL schools, getting new player/team data for db

    args:
        drop: if True, drops all tables (for complete db refresh)
    returns:
        nothing
    """

    if drop:
        # drop tables in csl table
        import model

        model.drop_all()

    ids = get_all_schools()

    for id in ids:
        print id
        sys.stdout.flush()
        os.system("python scrape.py %d" % id)
示例#3
0
#!/bin/env python

from model import create_all, drop_all

if __name__ == "__main__":
    drop_all()
    create_all()