def _generate_object(cls, soup, game, players):
        """
        get box_score data
        :param soup: Beautifulsoup object
        :param game: MLBAM Game object
        :param players: MLBAM Players object
        :return: pitchpx.box_score.box_score.BoxScore object
        """

        def get_batter(soup, team_flag):
            batting = soup.find('batting', attrs={'team_flag': team_flag})
            if batting:
                return batting.find_all('batter')
            return []

        def get_pitcher(soup, team_flag):
            pitching = soup.find('pitching', attrs={'team_flag': team_flag})
            if pitching:
                return pitching.find_all('pitcher')
            return []

        box_score = BoxScore(game, players)

        box_score.retro_game_id = game.retro_game_id
        box_score.home_team_id = game.home_team_id
        box_score.away_team_id = game.away_team_id
        box_score.home_batting = [box_score._get_batter(b) for b in get_batter(soup, 'home')]
        box_score.away_batting = [box_score._get_batter(b) for b in get_batter(soup, 'away')]
        box_score.home_pitching = [box_score._get_pitcher(p) for p in get_pitcher(soup, 'home')]
        box_score.away_pitching = [box_score._get_pitcher(p) for p in get_pitcher(soup, 'away')]

        return box_score