def league_scores(self, total_data, time):
        """Store output of fixtures based on league and time to a JSON file"""
        data = []
        for league, score in self.supported_leagues(total_data):
            item = {'league': league, 'homeTeamName': score['homeTeamName'],
                    'goalsHomeTeam': score['result']['goalsHomeTeam'],
                    'goalsAwayTeam': score['result']['goalsAwayTeam'],
                    'awayTeamName': score['awayTeamName']}
            data.append(item)
        self.generate_output({'league_scores': data, 'time': time})
def league_scores ( self , total_data , time ) : data = [ ] for league , score in self . supported_leagues ( total_data ) : item = { 'league' : league , 'homeTeamName' : score [ 'homeTeamName' ] , 'goalsHomeTeam' : score [ 'result' ] [ 'goalsHomeTeam' ] , 'goalsAwayTeam' : score [ 'result' ] [ 'goalsAwayTeam' ] , 'awayTeamName' : score [ 'awayTeamName' ] } data . append ( item ) self . generate_output ( { 'league_scores' : data , 'time' : time } )
Store output of fixtures based on league and time to a JSON file