예제 #1
0
파일: loadStats.py 프로젝트: cartyc/website
    def addStats(self):

        # Player stats links
        playerStats = [
            {'link': "http://ottawatravellers.ca/w1516/skater-standings/Div%2012/", 'season': "winter", 'year': 2015},
            {'link': "http://ottawatravellers.ca/S2015/skater-standings/Div7/", 'season': "summer", 'year': 2015},
            {'link': "http://ottawatravellers.ca/W1415/skater-standings/Div12/", 'season': "winter", 'year': 2014},
            {'link': "http://ottawatravellers.ca/s2014/skater-standings/Div8/", 'season': "summer", 'year': 2014},
            {'link': "http://ottawatravellers.ca/W1314/skater-standings/Div15/", 'season': "winter", 'year': 2013},
            {'link': "http://ottawatravellers.ca/s2013/skater-standings/Div11/", 'season': "summer", 'year': 2013},
            {'link': "http://ottawatravellers.ca/W1213/skater-standings/Div15/", 'season': "winter", 'year': 2012},
            {'link': "http://ottawatravellers.ca/s2012/skater-standings/Div14/", 'season': "summer", 'year': 2012},
            {'link': "http://ottawatravellers.ca/W1112333/skater-standings/Div17/", 'season': "winter", 'year': 2011},
            {'link': "http://ottawatravellers.ca/sum2011/skater-standings/Div10/", 'season': "summer", 'year': 2011},
            {'link': "http://ottawatravellers.ca/W1011/skater-standings/Div15/", 'season': "winter", 'year': 2010},
            {'link': "http://ottawatravellers.ca/sum2010/skater-standings/Div11/", 'season': "summer", 'year': 2010},
            {'link': "http://ottawatravellers.ca/W0910/skater-standings/Div17/", 'season': "winter", 'year': 2009},
            {'link': "http://ottawatravellers.ca/sum09/skater-standings/Div12/", 'season': "summer", 'year': 2009},
            {'link': "http://ottawatravellers.ca/Sum08/skater-standings/Div12/", 'season': "summer", 'year': 2008}
        ]

        goalieStats = [
            {'link': "http://ottawatravellers.ca/w1516/goalie-standings/Div%2012/", 'season': "winter", 'year': 2015},
            {'link': "http://ottawatravellers.ca/S2015/goalie-standings/Div7/", 'season': "summer", 'year': 2015},
            {'link': "http://ottawatravellers.ca/W1415/goalie-standings/Div12/", 'season': "winter", 'year': 2014},
            {'link': "http://ottawatravellers.ca/s2014/goalie-standings/Div8/", 'season': "summer", 'year': 2014},
            {'link': "http://ottawatravellers.ca/W1314/goalie-standings/Div15/", 'season': "winter", 'year': 2013},
            {'link': "http://ottawatravellers.ca/s2013/goalie-standings/Div11/", 'season': "summer", 'year': 2013},
            {'link': "http://ottawatravellers.ca/W1213/goalie-standings/Div15/", 'season': "winter", 'year': 2012},
            {'link': "http://ottawatravellers.ca/s2012/goalie-standings/Div14/", 'season': "summer", 'year': 2012},
            {'link': "http://ottawatravellers.ca/W1112333/goalie-standings/Div17/", 'season': "winter", 'year': 2011},
            {'link': "http://ottawatravellers.ca/sum2011/goalie-standings/Div10/", 'season': "summer", 'year': 2011},
            {'link': "http://ottawatravellers.ca/W1011/goalie-standings/Div15/", 'season': "winter", 'year': 2010},
            {'link': "http://ottawatravellers.ca/sum2010/goalie-standings/Div11/", 'season': "summer", 'year': 2010},
            {'link': "http://ottawatravellers.ca/W0910/goalie-standings/Div17/", 'season': "winter", 'year': 2009},
            {'link': "http://ottawatravellers.ca/sum09/goalie-standings/Div12/", 'season': "summer", 'year': 2009},
            {'link': "http://ottawatravellers.ca/Sum08/goalie-standings/Div12/", 'season': "summer", 'year': 2008}
        ]

        # Player Stats
        for season in playerStats:

            #Check for season
            s = seasonCheck(season['year'], season['season'])

            getStats.getPlayerStats(season['link'], s)


        print("goalies")
        # Goalie Stats
        for season in goalieStats:

            s = seasonCheck(season['year'], season['season'])

            getStats.getGoalieStats(season['link'], s)


        # load Schedule
        print("Get Schedule")
        getStats.getNextGame()
예제 #2
0
파일: tasks.py 프로젝트: cartyc/website
def updateStats():
    getStats.getNextGame()
    getStats.getPlayerStats()