In [265]:
from rauth import OAuth2Service
import webbrowser
import json
Prerequisite
First we need to create a Yahoo APP at https://developer.yahoo.com/apps/, and select Fantasy Sports - Read for API Permissions. Then we can get the Client ID (Consumer Key) and Client Secret (Consumer Secret)
In [266]:
clientId= "dj0yJmk9M3gzSWJZYzFmTWZtJmQ9WVdrOU9YcGxTMHB4TXpnbWNHbzlNQS0tJnM9Y29uc3VtZXJzZWNyZXQmeD1kZg--"
clinetSecrect="dbd101e179b3d129668965de65d05c02df42333d"
Step 1: Create an OAuth object
In [267]:
oauth = OAuth2Service(client_id = clientId,
client_secret = clinetSecrect,
name = "yahoo",
access_token_url = "https://api.login.yahoo.com/oauth2/get_token",
authorize_url = "https://api.login.yahoo.com/oauth2/request_auth",
base_url = "http://fantasysports.yahooapis.com/fantasy/v2/")
Step 2: Generate authorize url, and then get the verify code
For this script, the redirect_uri is set to 'oob',and open a page in brower to get the verify code. For Web APP server, we can set redirect uri as callback domain during Yahoo APP creation.
In [268]:
params = {
'response_type': 'code',
'redirect_uri': 'oob'
}
authorize_url = oauth.get_authorize_url(**params)
webbrowser.open(authorize_url)
code = input('Enter code: ')
Enter code: gnybkmd
Step 3: Get session with the code
In [269]:
data = {
'code': code,
'grant_type': 'authorization_code',
'redirect_uri': 'oob'
}
oauth_session = oauth.get_auth_session(data=data,
decoder= lambda payload : json.loads(payload.decode('utf-8')))
Example to get user Info
In [270]:
user_url='https://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1'
resp = oauth_session.get(user_url, params={'format': 'json'})
resp.json()
Out[270]:
{'fantasy_content': {'copyright': 'Data provided by Yahoo! and STATS, LLC',
'refresh_rate': '60',
'time': '16.024112701416ms',
'users': {'0': {'user': [{'guid': 'EQMHXVGZ65XDJ5G57ZRRBKXUTM'}]},
'count': 1},
'xml:lang': 'en-US',
'yahoo:uri': '/fantasy/v2/users;use_login=1'}}
In [271]:
user_guid=resp.json()['fantasy_content']['users']['0']['user'][0]['guid']
user_guid
Out[271]:
'EQMHXVGZ65XDJ5G57ZRRBKXUTM'
Example to query nba teams of logged user.
In [272]:
team_url = 'https://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games;game_keys=nba/teams'
resp = oauth_session.get(team_url, params={'format': 'json'})
teams = resp.json()['fantasy_content']['users']['0']['user'][1]['games']['0']['game'][1]['teams']
teams
Out[272]:
{'0': {'team': [[{'team_key': '375.l.573.t.2'},
{'team_id': '2'},
{'name': 'C2-真邪门'},
{'is_owned_by_current_login': 1},
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/2'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://ct.yimg.com/cy/4725/38954867636_d47b60_192sq.jpg?ct=fantasy'}}]},
{'division_id': '3'},
{'waiver_priority': 20},
{'faab_balance': '2'},
{'number_of_moves': '62'},
{'number_of_trades': '6'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '1'}},
[],
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '199'},
{'auction_budget_spent': 199},
{'managers': [{'manager': {'guid': 'EQMHXVGZ65XDJ5G57ZRRBKXUTM',
'image_url': 'https://ct.yimg.com/cy/4556/23861899267_82a6e0_64sq.jpg',
'is_current_login': '1',
'manager_id': '2',
'nickname': '邪'}}]}],
None]},
'1': {'team': [[{'team_key': '375.l.1039.t.17'},
{'team_id': '17'},
{'name': '信你邪'},
{'is_owned_by_current_login': 1},
{'url': 'https://basketball.fantasysports.yahoo.com/nba/1039/17'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://ct.yimg.com/cy/4435/23607972697_ad6375_192sq.jpg?ct=fantasy'}}]},
[],
{'waiver_priority': 4},
[],
{'number_of_moves': '18'},
{'number_of_trades': '4'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '0'}},
{'clinched_playoffs': 1},
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
[],
[],
{'managers': [{'manager': {'guid': 'EQMHXVGZ65XDJ5G57ZRRBKXUTM',
'image_url': 'https://ct.yimg.com/cy/4556/23861899267_82a6e0_64sq.jpg',
'is_current_login': '1',
'manager_id': '17',
'nickname': '邪'}}]}],
None]},
'2': {'team': [[{'team_key': '375.l.15031.t.5'},
{'team_id': '5'},
{'name': '八菜鸟'},
{'is_owned_by_current_login': 1},
{'url': 'https://basketball.fantasysports.yahoo.com/nba/15031/5'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://ct.yimg.com/cy/4619/37855982573_bd3af4_192sq.jpg?ct=fantasy'}}]},
[],
{'waiver_priority': 16},
{'faab_balance': '89'},
{'number_of_moves': '31'},
{'number_of_trades': '7'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '0'}},
[],
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '200'},
{'auction_budget_spent': 200},
{'managers': [{'manager': {'guid': 'EQMHXVGZ65XDJ5G57ZRRBKXUTM',
'image_url': 'https://ct.yimg.com/cy/4556/23861899267_82a6e0_64sq.jpg',
'is_current_login': '1',
'manager_id': '5',
'nickname': '邪'}}]}],
None]},
'count': 3}
In [273]:
team_count = int(teams['count'])
team_count
Out[273]:
3
In [295]:
for idx in range(0,team_count):
team = teams[str(idx)]['team'][0][19]['managers']
print(team, '\n')
[{'manager': {'manager_id': '2', 'nickname': '邪', 'guid': 'EQMHXVGZ65XDJ5G57ZRRBKXUTM', 'is_current_login': '1', 'image_url': 'https://ct.yimg.com/cy/4556/23861899267_82a6e0_64sq.jpg'}}]
[{'manager': {'manager_id': '17', 'nickname': '邪', 'guid': 'EQMHXVGZ65XDJ5G57ZRRBKXUTM', 'is_current_login': '1', 'image_url': 'https://ct.yimg.com/cy/4556/23861899267_82a6e0_64sq.jpg'}}]
[{'manager': {'manager_id': '5', 'nickname': '邪', 'guid': 'EQMHXVGZ65XDJ5G57ZRRBKXUTM', 'is_current_login': '1', 'image_url': 'https://ct.yimg.com/cy/4556/23861899267_82a6e0_64sq.jpg'}}]
Example to get nba leagues of logged user
In [275]:
league_url = 'https://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games;game_keys=nba/leagues'
resp = oauth_session.get(league_url, params={'format': 'json'})
leagues = resp.json()['fantasy_content']['users']['0']['user'][1]['games']['0']['game'][1]['leagues']
leagues
Out[275]:
{'0': {'league': [{'allow_add_to_dl_extra_pos': 1,
'current_week': 21,
'draft_status': 'postdraft',
'edit_key': '2018-03-13',
'end_date': '2018-04-01',
'end_week': '23',
'game_code': 'nba',
'iris_group_chat_id': 'TJA2CBKGARGW7H3THMJ2WKTA4Y',
'is_cash_league': '0',
'is_pro_league': '0',
'league_id': '573',
'league_key': '375.l.573',
'league_type': 'private',
'league_update_timestamp': '1520922304',
'name': 'Never Ending',
'num_teams': 20,
'renew': '364_817',
'renewed': '',
'scoring_type': 'head',
'season': '2017',
'start_date': '2017-10-17',
'start_week': '1',
'url': 'https://basketball.fantasysports.yahoo.com/nba/573',
'weekly_deadline': 'intraday'}]},
'1': {'league': [{'allow_add_to_dl_extra_pos': 0,
'current_week': 21,
'draft_status': 'postdraft',
'edit_key': '2018-03-14',
'end_date': '2018-04-01',
'end_week': '23',
'game_code': 'nba',
'iris_group_chat_id': 'AYFAMW6K7FAMBEKTQHCF33OSMU',
'is_cash_league': '0',
'is_pro_league': '0',
'league_id': '1039',
'league_key': '375.l.1039',
'league_type': 'private',
'league_update_timestamp': '1520922491',
'name': 'Alpha2017',
'num_teams': 18,
'renew': '364_24740',
'renewed': '',
'scoring_type': 'head',
'season': '2017',
'start_date': '2017-10-17',
'start_week': '1',
'url': 'https://basketball.fantasysports.yahoo.com/nba/1039',
'weekly_deadline': ''}]},
'2': {'league': [{'allow_add_to_dl_extra_pos': 0,
'current_week': 21,
'draft_status': 'postdraft',
'edit_key': '2018-03-14',
'end_date': '2018-04-11',
'end_week': '24',
'game_code': 'nba',
'iris_group_chat_id': '2PBWBVXAMZGHXE3LVVUZ5SYEHQ',
'is_cash_league': '0',
'is_pro_league': '0',
'league_id': '15031',
'league_key': '375.l.15031',
'league_type': 'private',
'league_update_timestamp': '1520922528',
'name': 'New Beginning 2017',
'num_teams': 18,
'renew': '364_24682',
'renewed': '',
'scoring_type': 'head',
'season': '2017',
'start_date': '2017-10-17',
'start_week': '1',
'url': 'https://basketball.fantasysports.yahoo.com/nba/15031',
'weekly_deadline': ''}]},
'count': 3}
In [276]:
league_count = int(leagues['count'])
league_count
Out[276]:
3
In [277]:
for idx in range(0,league_count):
league = leagues[str(idx)]['league'][0]
print(league, '\n')
{'league_key': '375.l.573', 'league_id': '573', 'name': 'Never Ending', 'url': 'https://basketball.fantasysports.yahoo.com/nba/573', 'draft_status': 'postdraft', 'num_teams': 20, 'edit_key': '2018-03-13', 'weekly_deadline': 'intraday', 'league_update_timestamp': '1520922304', 'scoring_type': 'head', 'league_type': 'private', 'renew': '364_817', 'renewed': '', 'iris_group_chat_id': 'TJA2CBKGARGW7H3THMJ2WKTA4Y', 'allow_add_to_dl_extra_pos': 1, 'is_pro_league': '0', 'is_cash_league': '0', 'current_week': 21, 'start_week': '1', 'start_date': '2017-10-17', 'end_week': '23', 'end_date': '2018-04-01', 'game_code': 'nba', 'season': '2017'}
{'league_key': '375.l.1039', 'league_id': '1039', 'name': 'Alpha2017', 'url': 'https://basketball.fantasysports.yahoo.com/nba/1039', 'draft_status': 'postdraft', 'num_teams': 18, 'edit_key': '2018-03-14', 'weekly_deadline': '', 'league_update_timestamp': '1520922491', 'scoring_type': 'head', 'league_type': 'private', 'renew': '364_24740', 'renewed': '', 'iris_group_chat_id': 'AYFAMW6K7FAMBEKTQHCF33OSMU', 'allow_add_to_dl_extra_pos': 0, 'is_pro_league': '0', 'is_cash_league': '0', 'current_week': 21, 'start_week': '1', 'start_date': '2017-10-17', 'end_week': '23', 'end_date': '2018-04-01', 'game_code': 'nba', 'season': '2017'}
{'league_key': '375.l.15031', 'league_id': '15031', 'name': 'New Beginning 2017', 'url': 'https://basketball.fantasysports.yahoo.com/nba/15031', 'draft_status': 'postdraft', 'num_teams': 18, 'edit_key': '2018-03-14', 'weekly_deadline': '', 'league_update_timestamp': '1520922528', 'scoring_type': 'head', 'league_type': 'private', 'renew': '364_24682', 'renewed': '', 'iris_group_chat_id': '2PBWBVXAMZGHXE3LVVUZ5SYEHQ', 'allow_add_to_dl_extra_pos': 0, 'is_pro_league': '0', 'is_cash_league': '0', 'current_week': 21, 'start_week': '1', 'start_date': '2017-10-17', 'end_week': '24', 'end_date': '2018-04-11', 'game_code': 'nba', 'season': '2017'}
Example to get league metadata
In [278]:
settings_url = 'https://fantasysports.yahooapis.com/fantasy/v2/game/nba/leagues;league_keys=375.l.1039/settings'
resp = oauth_session.get(settings_url, params={'format': 'json'})
settings = resp.json()['fantasy_content']['game'][1]['leagues']['0']['league'][1]['settings'][0]
settings
Out[278]:
{'cant_cut_list': 'yahoo',
'draft_pick_time': '90',
'draft_time': '1506168000',
'draft_type': 'live',
'has_multiweek_championship': 0,
'has_playoff_consolation_games': True,
'is_auction_draft': '0',
'max_adds': '36',
'max_teams': '18',
'max_trades': '12',
'num_playoff_consolation_teams': 6,
'num_playoff_teams': '6',
'persistent_url': 'https://basketball.fantasysports.yahoo.com/league/alpha2017',
'player_pool': 'ALL',
'playoff_start_week': '21',
'post_draft_players': 'W',
'roster_positions': [{'roster_position': {'count': 1,
'position': 'PG',
'position_type': 'P'}},
{'roster_position': {'count': 1, 'position': 'SG', 'position_type': 'P'}},
{'roster_position': {'count': 1, 'position': 'G', 'position_type': 'P'}},
{'roster_position': {'count': 1, 'position': 'SF', 'position_type': 'P'}},
{'roster_position': {'count': 1, 'position': 'PF', 'position_type': 'P'}},
{'roster_position': {'count': 1, 'position': 'F', 'position_type': 'P'}},
{'roster_position': {'count': 2, 'position': 'C', 'position_type': 'P'}},
{'roster_position': {'count': 1, 'position': 'Util', 'position_type': 'P'}},
{'roster_position': {'count': 3, 'position': 'BN'}}],
'scoring_type': 'head',
'stat_categories': {'stats': [{'stat': {'display_name': 'FGM/A',
'enabled': '1',
'is_only_display_stat': '1',
'name': 'Field Goals Made / Field Goals Attempted',
'position_type': 'P',
'sort_order': '1',
'stat_id': 9004003,
'stat_position_types': [{'stat_position_type': {'is_only_display_stat': '1',
'position_type': 'P'}}]}},
{'stat': {'display_name': 'FG%',
'enabled': '1',
'name': 'Field Goal Percentage',
'position_type': 'P',
'sort_order': '1',
'stat_id': 5,
'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}},
{'stat': {'display_name': 'FTM/A',
'enabled': '1',
'is_only_display_stat': '1',
'name': 'Free Throws Made / Free Throws Attempted',
'position_type': 'P',
'sort_order': '1',
'stat_id': 9007006,
'stat_position_types': [{'stat_position_type': {'is_only_display_stat': '1',
'position_type': 'P'}}]}},
{'stat': {'display_name': 'FT%',
'enabled': '1',
'name': 'Free Throw Percentage',
'position_type': 'P',
'sort_order': '1',
'stat_id': 8,
'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}},
{'stat': {'display_name': '3PTM',
'enabled': '1',
'name': '3-point Shots Made',
'position_type': 'P',
'sort_order': '1',
'stat_id': 10,
'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}},
{'stat': {'display_name': 'PTS',
'enabled': '1',
'name': 'Points Scored',
'position_type': 'P',
'sort_order': '1',
'stat_id': 12,
'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}},
{'stat': {'display_name': 'OREB',
'enabled': '1',
'name': 'Offensive Rebounds',
'position_type': 'P',
'sort_order': '1',
'stat_id': 13,
'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}},
{'stat': {'display_name': 'REB',
'enabled': '1',
'name': 'Total Rebounds',
'position_type': 'P',
'sort_order': '1',
'stat_id': 15,
'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}},
{'stat': {'display_name': 'AST',
'enabled': '1',
'name': 'Assists',
'position_type': 'P',
'sort_order': '1',
'stat_id': 16,
'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}},
{'stat': {'display_name': 'ST',
'enabled': '1',
'name': 'Steals',
'position_type': 'P',
'sort_order': '1',
'stat_id': 17,
'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}},
{'stat': {'display_name': 'BLK',
'enabled': '1',
'name': 'Blocked Shots',
'position_type': 'P',
'sort_order': '1',
'stat_id': 18,
'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}},
{'stat': {'display_name': 'TO',
'enabled': '1',
'name': 'Turnovers',
'position_type': 'P',
'sort_order': '0',
'stat_id': 19,
'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}},
{'stat': {'display_name': 'A/T',
'enabled': '1',
'name': 'Assist/Turnover Ratio',
'position_type': 'P',
'sort_order': '1',
'stat_id': 20,
'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}}]},
'trade_end_date': '2018-03-01',
'trade_ratify_type': 'commish',
'trade_reject_time': '2',
'uses_faab': '0',
'uses_lock_eliminated_teams': 0,
'uses_playoff': '1',
'uses_playoff_reseeding': 0,
'waiver_rule': 'all',
'waiver_time': '2',
'waiver_type': 'R'}
In [279]:
stat_categories = settings['stat_categories']['stats']
for category in stat_categories:
print(category['stat'], '\n')
{'stat_id': 9004003, 'enabled': '1', 'name': 'Field Goals Made / Field Goals Attempted', 'display_name': 'FGM/A', 'sort_order': '1', 'position_type': 'P', 'stat_position_types': [{'stat_position_type': {'position_type': 'P', 'is_only_display_stat': '1'}}], 'is_only_display_stat': '1'}
{'stat_id': 5, 'enabled': '1', 'name': 'Field Goal Percentage', 'display_name': 'FG%', 'sort_order': '1', 'position_type': 'P', 'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}
{'stat_id': 9007006, 'enabled': '1', 'name': 'Free Throws Made / Free Throws Attempted', 'display_name': 'FTM/A', 'sort_order': '1', 'position_type': 'P', 'stat_position_types': [{'stat_position_type': {'position_type': 'P', 'is_only_display_stat': '1'}}], 'is_only_display_stat': '1'}
{'stat_id': 8, 'enabled': '1', 'name': 'Free Throw Percentage', 'display_name': 'FT%', 'sort_order': '1', 'position_type': 'P', 'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}
{'stat_id': 10, 'enabled': '1', 'name': '3-point Shots Made', 'display_name': '3PTM', 'sort_order': '1', 'position_type': 'P', 'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}
{'stat_id': 12, 'enabled': '1', 'name': 'Points Scored', 'display_name': 'PTS', 'sort_order': '1', 'position_type': 'P', 'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}
{'stat_id': 13, 'enabled': '1', 'name': 'Offensive Rebounds', 'display_name': 'OREB', 'sort_order': '1', 'position_type': 'P', 'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}
{'stat_id': 15, 'enabled': '1', 'name': 'Total Rebounds', 'display_name': 'REB', 'sort_order': '1', 'position_type': 'P', 'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}
{'stat_id': 16, 'enabled': '1', 'name': 'Assists', 'display_name': 'AST', 'sort_order': '1', 'position_type': 'P', 'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}
{'stat_id': 17, 'enabled': '1', 'name': 'Steals', 'display_name': 'ST', 'sort_order': '1', 'position_type': 'P', 'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}
{'stat_id': 18, 'enabled': '1', 'name': 'Blocked Shots', 'display_name': 'BLK', 'sort_order': '1', 'position_type': 'P', 'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}
{'stat_id': 19, 'enabled': '1', 'name': 'Turnovers', 'display_name': 'TO', 'sort_order': '0', 'position_type': 'P', 'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}
{'stat_id': 20, 'enabled': '1', 'name': 'Assist/Turnover Ratio', 'display_name': 'A/T', 'sort_order': '1', 'position_type': 'P', 'stat_position_types': [{'stat_position_type': {'position_type': 'P'}}]}
Get all teams of a league
In [280]:
teams_url = 'https://fantasysports.yahooapis.com/fantasy/v2/league/375.l.573/teams'
resp = oauth_session.get(teams_url, params={'format': 'json'})
league_teams = resp.json()['fantasy_content']['league'][1]['teams']
league_teams
Out[280]:
{'0': {'team': [[{'team_key': '375.l.573.t.1'},
{'team_id': '1'},
{'name': 'C1-szrocky'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/1'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://ct.yimg.com/cy/4345/25942278979_a8f154_192sq.jpg?ct=fantasy'}}]},
{'division_id': '3'},
{'waiver_priority': 14},
{'faab_balance': '10'},
{'number_of_moves': '58'},
{'number_of_trades': '1'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '1'}},
[],
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '200'},
{'auction_budget_spent': 195},
{'managers': [{'manager': {'email': 'rockygu@21cn.com',
'guid': 'GH5XETJTNQTKCUZH6MZUNH2PBM',
'image_url': 'https://ct.yimg.com/cy/4725/37939417090_dd288c_64sq.jpg',
'is_commissioner': '1',
'manager_id': '1',
'nickname': 'Rocky'}}]}]]},
'1': {'team': [[{'team_key': '375.l.573.t.2'},
{'team_id': '2'},
{'name': 'C2-真邪门'},
{'is_owned_by_current_login': 1},
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/2'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://ct.yimg.com/cy/4725/38954867636_d47b60_192sq.jpg?ct=fantasy'}}]},
{'division_id': '3'},
{'waiver_priority': 20},
{'faab_balance': '2'},
{'number_of_moves': '62'},
{'number_of_trades': '6'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '1'}},
[],
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '199'},
{'auction_budget_spent': 199},
{'managers': [{'manager': {'guid': 'EQMHXVGZ65XDJ5G57ZRRBKXUTM',
'image_url': 'https://ct.yimg.com/cy/4556/23861899267_82a6e0_64sq.jpg',
'is_current_login': '1',
'manager_id': '2',
'nickname': '邪'}}]}]]},
'10': {'team': [[{'team_key': '375.l.573.t.11'},
{'team_id': '11'},
{'name': 'A4-dragonball'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/11'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://ct.yimg.com/cy/1687/25344958385_85325603cf_192sq.jpg?ct=fantasy'}}]},
{'division_id': '1'},
{'waiver_priority': 4},
{'faab_balance': '35'},
{'number_of_moves': '25'},
{'number_of_trades': '6'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '0'}},
[],
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '200'},
{'auction_budget_spent': 200},
{'managers': [{'manager': {'email': '313554779@qq.com',
'guid': 'K2RQUB4V4LHEX6UL6YYFLN64OU',
'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png',
'manager_id': '11',
'nickname': 'Zhu Heng'}}]}]]},
'11': {'team': [[{'team_key': '375.l.573.t.12'},
{'team_id': '12'},
{'name': 'C3-Lydia'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/12'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_01_100.png'}}]},
{'division_id': '3'},
{'waiver_priority': 2},
{'faab_balance': '0'},
{'number_of_moves': '28'},
{'number_of_trades': '4'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '0'}},
[],
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '200'},
{'auction_budget_spent': 198},
{'managers': [{'manager': {'email': '16808774@qq.com',
'guid': 'HFMFRGGN5E7EI62HEGE7FT7A6Q',
'image_url': 'https://ct.yimg.com/cy/4473/37602919364_731a05_64sq.jpg',
'manager_id': '12',
'nickname': 'Lydia'}}]}]]},
'12': {'team': [[{'team_key': '375.l.573.t.13'},
{'team_id': '13'},
{'name': 'B4-苦菜花'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/13'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_05_100.png'}}]},
{'division_id': '2'},
{'waiver_priority': 15},
{'faab_balance': '0'},
{'number_of_moves': '35'},
{'number_of_trades': '7'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '3'}},
[],
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '206'},
{'auction_budget_spent': 206},
{'managers': [{'manager': {'email': 'clinton1982@sina.com',
'guid': 'BJLLFAFT6WB6YTIHMM64WTLNHA',
'image_url': 'https://ct.yimg.com/cy/4498/37586704474_f93cd5_64sq.jpg',
'manager_id': '13',
'nickname': '虚拟'}}]}]]},
'13': {'team': [[{'team_key': '375.l.573.t.14'},
{'team_id': '14'},
{'name': 'D4-lebronjames'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/14'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_01_100.png'}}]},
{'division_id': '4'},
{'waiver_priority': 7},
{'faab_balance': '15'},
{'number_of_moves': '36'},
{'number_of_trades': '1'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '0'}},
[],
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '200'},
{'auction_budget_spent': 197},
{'managers': [{'manager': {'guid': 'T2ZPHMM7ZSFY3PY3R2GXAVAVXQ',
'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png',
'manager_id': '14',
'nickname': 'ted'}}]}]]},
'14': {'team': [[{'team_key': '375.l.573.t.15'},
{'team_id': '15'},
{'name': 'D5-unbe'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/15'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://ct.yimg.com/cy/1656/25214693492_db83b88754_192sq.jpg?ct=fantasy'}}]},
{'division_id': '4'},
{'waiver_priority': 5},
{'faab_balance': '37'},
{'number_of_moves': '29'},
{'number_of_trades': '2'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '0'}},
[],
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '204'},
{'auction_budget_spent': 204},
{'managers': [{'manager': {'email': 'cliffjiajia@163.com',
'guid': 'HGM27Q7E525UDSCWKAVEHRMPK4',
'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png',
'manager_id': '15',
'nickname': 'unbelievable'}}]}]]},
'15': {'team': [[{'team_key': '375.l.573.t.16'},
{'team_id': '16'},
{'name': 'A1-阿木'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/16'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_09_100.png'}}]},
{'division_id': '1'},
{'waiver_priority': 16},
{'faab_balance': '3'},
{'number_of_moves': '60'},
{'number_of_trades': '1'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '0'}},
[],
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '201'},
{'auction_budget_spent': 199},
{'managers': [{'manager': {'email': 'crossmeteor@yahoo.com',
'guid': 'KBQ3YFFP6AMJVVMCCDRKICNF74',
'image_url': 'https://ct.yimg.com/cy/4595/27369545699_a5cc12_64sq.jpg',
'is_commissioner': '1',
'manager_id': '16',
'nickname': 'Huang'}}]}]]},
'16': {'team': [[{'team_key': '375.l.573.t.17'},
{'team_id': '17'},
{'name': 'D2-天王'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/17'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_01_100.png'}}]},
{'division_id': '4'},
{'waiver_priority': 3},
{'faab_balance': '0'},
{'number_of_moves': '28'},
{'number_of_trades': '3'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '0'}},
[],
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '202'},
{'auction_budget_spent': 200},
{'managers': [{'manager': {'email': 'chrischan880223@yahoo.com',
'guid': 'HOI76OLNR7DUGA3N4IQFS4IWIQ',
'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png',
'manager_id': '17',
'nickname': 'Chris'}}]}]]},
'17': {'team': [[{'team_key': '375.l.573.t.18'},
{'team_id': '18'},
{'name': 'A5 - 鸡基'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/18'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://ct.yimg.com/cy/4447/26043029009_caa5f2_192sq.jpg?ct=fantasy'}}]},
{'division_id': '1'},
{'waiver_priority': 12},
{'faab_balance': '12'},
{'number_of_moves': '41'},
{'number_of_trades': '2'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '1'}},
[],
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '200'},
{'auction_budget_spent': 198},
{'managers': [{'manager': {'email': 'df87523@yahoo.com',
'guid': 'KHV7E4QK5YRS4COW2QCHAKEDCU',
'image_url': 'https://ct.yimg.com/cy/4575/38153422014_9ce52c_64sq.jpg',
'manager_id': '18',
'nickname': 'fd'}},
{'manager': {'email': 'st-david@hotmail.com',
'guid': 'R5ZTKEUC5DMSGCQTV3TIFWLMSI',
'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png',
'is_comanager': '1',
'manager_id': '21',
'nickname': 'Mars T'}}]}]]},
'18': {'team': [[{'team_key': '375.l.573.t.19'},
{'team_id': '19'},
{'name': 'B3-xiuxian'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/19'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_07_100.png'}}]},
{'division_id': '2'},
{'waiver_priority': 18},
{'faab_balance': '14'},
{'number_of_moves': '37'},
{'number_of_trades': '1'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '2'}},
{'clinched_playoffs': 1},
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '198'},
{'auction_budget_spent': 198},
{'managers': [{'manager': {'email': 'chenlei_th@hotmail.com',
'guid': 'I6HNSBFPTRRXLMQ7P2SR6J57GQ',
'image_url': 'https://ct.yimg.com/cy/4690/37713810903_a49284_64sq.jpg',
'manager_id': '19',
'nickname': 'LeiChen'}}]}]]},
'19': {'team': [[{'team_key': '375.l.573.t.20'},
{'team_id': '20'},
{'name': 'D3-CP9'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/20'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_01_100.png'}}]},
{'division_id': '4'},
{'waiver_priority': 13},
{'faab_balance': '22'},
{'number_of_moves': '51'},
{'number_of_trades': '9'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '2'}},
[],
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '199'},
{'auction_budget_spent': 199},
{'managers': [{'manager': {'email': 'rhinoxlg@yahoo.com',
'guid': 'KZG45PTB6KA2BZHEUJFLGF26WI',
'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png',
'manager_id': '20',
'nickname': 'Richard'}}]}]]},
'2': {'team': [[{'team_key': '375.l.573.t.3'},
{'team_id': '3'},
{'name': 'C4-阴有时有雨'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/3'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_08_100.png'}}]},
{'division_id': '3'},
{'waiver_priority': 19},
{'faab_balance': '16'},
{'number_of_moves': '55'},
{'number_of_trades': '5'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '1'}},
{'clinched_playoffs': 1},
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '196'},
{'auction_budget_spent': 196},
{'managers': [{'manager': {'guid': '6FHWG57T5PNK2FM3NXF5EEWA3U',
'image_url': 'https://ct.yimg.com/cy/4585/38729776096_c363ac_64sq.jpg',
'manager_id': '3',
'nickname': 'Josh'}}]}]]},
'3': {'team': [[{'team_key': '375.l.573.t.4'},
{'team_id': '4'},
{'name': 'A3-Marsmnky'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/4'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_01_100.png'}}]},
{'division_id': '1'},
{'waiver_priority': 10},
{'faab_balance': '0'},
{'number_of_moves': '61'},
{'number_of_trades': '10'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '1'}},
{'clinched_playoffs': 1},
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '200'},
{'auction_budget_spent': 193},
{'managers': [{'manager': {'email': 'st-david@hotmail.com',
'guid': 'R5ZTKEUC5DMSGCQTV3TIFWLMSI',
'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png',
'manager_id': '4',
'nickname': 'Mars T'}}]}]]},
'4': {'team': [[{'team_key': '375.l.573.t.5'},
{'team_id': '5'},
{'name': 'A2-苏打绿'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/5'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://ct.yimg.com/cy/4335/23391236588_d43959_192sq.jpg?ct=fantasy'}}]},
{'division_id': '1'},
{'waiver_priority': 11},
{'faab_balance': '11'},
{'number_of_moves': '52'},
{'number_of_trades': '5'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '2'}},
{'clinched_playoffs': 1},
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '199'},
{'auction_budget_spent': 198},
{'managers': [{'manager': {'email': 'filippolu@yahoo.com',
'guid': 'FOHURZVIRU6NBP3UOSOUM5OEEA',
'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png',
'manager_id': '5',
'nickname': 'fan'}}]}]]},
'5': {'team': [[{'team_key': '375.l.573.t.6'},
{'team_id': '6'},
{'name': 'C5-Gray Potato'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/6'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_05_100.png'}}]},
{'division_id': '3'},
{'waiver_priority': 1},
{'faab_balance': '0'},
{'number_of_moves': '13'},
{'number_of_trades': '4'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '0'}},
[],
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '200'},
{'auction_budget_spent': 200},
{'managers': [{'manager': {'email': '59781915@qq.com',
'guid': '3NUR5O5PS6P33EEKBFEW4QRC2E',
'image_url': 'https://ct.yimg.com/cy/4680/38119766965_3e7117_64sq.jpg',
'manager_id': '6',
'nickname': 'Panwenjie'}}]}]]},
'6': {'team': [[{'team_key': '375.l.573.t.7'},
{'team_id': '7'},
{'name': 'D1-pippo'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/7'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_03_100.png'}}]},
{'division_id': '4'},
{'waiver_priority': 9},
{'faab_balance': '0'},
{'number_of_moves': '42'},
{'number_of_trades': '5'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '0'}},
[],
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '201'},
{'auction_budget_spent': 201},
{'managers': [{'manager': {'email': 'pippona@ymail.com',
'guid': 'SRJTDXM7NCKJSWAWFGHDKMGP4U',
'image_url': 'https://s.yimg.com/wv/images/e1444b788688b4f24aa132deec3df84d_64.jpeg',
'is_commissioner': '1',
'manager_id': '7',
'nickname': 'pippo'}}]}]]},
'7': {'team': [[{'team_key': '375.l.573.t.8'},
{'team_id': '8'},
{'name': 'B5-Sin'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/8'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_01_100.png'}}]},
{'division_id': '2'},
{'waiver_priority': 6},
{'faab_balance': '43'},
{'number_of_moves': '34'},
{'number_of_trades': 0},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '1'}},
{'clinched_playoffs': 1},
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '201'},
{'auction_budget_spent': 201},
{'managers': [{'manager': {'email': 'sinfifa@163.com',
'guid': 'VYOYNLQKG4KJPP653GLEWIWTH4',
'image_url': 'https://ct.yimg.com/cy/4730/27437247689_968ccd_64sq.jpg',
'manager_id': '8',
'nickname': 'sin'}}]}]]},
'8': {'team': [[{'team_key': '375.l.573.t.9'},
{'team_id': '9'},
{'name': 'B2-Jordan'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/9'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_01_100.png'}}]},
{'division_id': '2'},
{'waiver_priority': 8},
{'faab_balance': '12'},
{'number_of_moves': '64'},
{'number_of_trades': '4'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '0'}},
[],
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '196'},
{'auction_budget_spent': 195},
{'managers': [{'manager': {'guid': 'PNSGFB66AWDITQED3PN5DGTTEI',
'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png',
'manager_id': '9',
'nickname': 'Jordan'}}]}]]},
'9': {'team': [[{'team_key': '375.l.573.t.10'},
{'team_id': '10'},
{'name': 'B1-F.E.D.S'},
[],
{'url': 'https://basketball.fantasysports.yahoo.com/nba/573/10'},
{'team_logos': [{'team_logo': {'size': 'large',
'url': 'https://ct.yimg.com/cy/4449/26108207669_bb6800_192sq.jpg?ct=fantasy'}}]},
{'division_id': '2'},
{'waiver_priority': 17},
{'faab_balance': '30'},
{'number_of_moves': '50'},
{'number_of_trades': '2'},
{'roster_adds': {'coverage_type': 'week',
'coverage_value': 21,
'value': '1'}},
{'clinched_playoffs': 1},
{'league_scoring_type': 'head'},
[],
[],
{'has_draft_grade': 0},
{'auction_budget_total': '198'},
{'auction_budget_spent': 198},
{'managers': [{'manager': {'email': 'caimin9@sohu.com',
'guid': 'JO6JSRTPVO2SYDUXW6HOM5HLK4',
'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png',
'is_commissioner': '1',
'manager_id': '10',
'nickname': '民'}}]}]]},
'count': 20}
In [281]:
league_team_count = int(league_teams['count'])
league_team_count
Out[281]:
20
In [282]:
for idx in range(0,league_team_count):
league_team = league_teams[str(idx)]['team'][0]
print(league_team, '\n')
team_logo = league_team[5]['team_logos'][0]['team_logo']['url']
# print('team_log', team_logo)
[{'team_key': '375.l.573.t.1'}, {'team_id': '1'}, {'name': 'C1-szrocky'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/1'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://ct.yimg.com/cy/4345/25942278979_a8f154_192sq.jpg?ct=fantasy'}}]}, {'division_id': '3'}, {'waiver_priority': 14}, {'faab_balance': '10'}, {'number_of_moves': '58'}, {'number_of_trades': '1'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '1'}}, [], {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '200'}, {'auction_budget_spent': 195}, {'managers': [{'manager': {'manager_id': '1', 'nickname': 'Rocky', 'guid': 'GH5XETJTNQTKCUZH6MZUNH2PBM', 'is_commissioner': '1', 'email': 'rockygu@21cn.com', 'image_url': 'https://ct.yimg.com/cy/4725/37939417090_dd288c_64sq.jpg'}}]}]
[{'team_key': '375.l.573.t.2'}, {'team_id': '2'}, {'name': 'C2-真邪门'}, {'is_owned_by_current_login': 1}, {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/2'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://ct.yimg.com/cy/4725/38954867636_d47b60_192sq.jpg?ct=fantasy'}}]}, {'division_id': '3'}, {'waiver_priority': 20}, {'faab_balance': '2'}, {'number_of_moves': '62'}, {'number_of_trades': '6'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '1'}}, [], {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '199'}, {'auction_budget_spent': 199}, {'managers': [{'manager': {'manager_id': '2', 'nickname': '邪', 'guid': 'EQMHXVGZ65XDJ5G57ZRRBKXUTM', 'is_current_login': '1', 'image_url': 'https://ct.yimg.com/cy/4556/23861899267_82a6e0_64sq.jpg'}}]}]
[{'team_key': '375.l.573.t.3'}, {'team_id': '3'}, {'name': 'C4-阴有时有雨'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/3'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_08_100.png'}}]}, {'division_id': '3'}, {'waiver_priority': 19}, {'faab_balance': '16'}, {'number_of_moves': '55'}, {'number_of_trades': '5'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '1'}}, {'clinched_playoffs': 1}, {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '196'}, {'auction_budget_spent': 196}, {'managers': [{'manager': {'manager_id': '3', 'nickname': 'Josh', 'guid': '6FHWG57T5PNK2FM3NXF5EEWA3U', 'image_url': 'https://ct.yimg.com/cy/4585/38729776096_c363ac_64sq.jpg'}}]}]
[{'team_key': '375.l.573.t.4'}, {'team_id': '4'}, {'name': 'A3-Marsmnky'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/4'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_01_100.png'}}]}, {'division_id': '1'}, {'waiver_priority': 10}, {'faab_balance': '0'}, {'number_of_moves': '61'}, {'number_of_trades': '10'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '1'}}, {'clinched_playoffs': 1}, {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '200'}, {'auction_budget_spent': 193}, {'managers': [{'manager': {'manager_id': '4', 'nickname': 'Mars T', 'guid': 'R5ZTKEUC5DMSGCQTV3TIFWLMSI', 'email': 'st-david@hotmail.com', 'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png'}}]}]
[{'team_key': '375.l.573.t.5'}, {'team_id': '5'}, {'name': 'A2-苏打绿'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/5'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://ct.yimg.com/cy/4335/23391236588_d43959_192sq.jpg?ct=fantasy'}}]}, {'division_id': '1'}, {'waiver_priority': 11}, {'faab_balance': '11'}, {'number_of_moves': '52'}, {'number_of_trades': '5'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '2'}}, {'clinched_playoffs': 1}, {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '199'}, {'auction_budget_spent': 198}, {'managers': [{'manager': {'manager_id': '5', 'nickname': 'fan', 'guid': 'FOHURZVIRU6NBP3UOSOUM5OEEA', 'email': 'filippolu@yahoo.com', 'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png'}}]}]
[{'team_key': '375.l.573.t.6'}, {'team_id': '6'}, {'name': 'C5-Gray Potato'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/6'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_05_100.png'}}]}, {'division_id': '3'}, {'waiver_priority': 1}, {'faab_balance': '0'}, {'number_of_moves': '13'}, {'number_of_trades': '4'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '0'}}, [], {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '200'}, {'auction_budget_spent': 200}, {'managers': [{'manager': {'manager_id': '6', 'nickname': 'Panwenjie', 'guid': '3NUR5O5PS6P33EEKBFEW4QRC2E', 'email': '59781915@qq.com', 'image_url': 'https://ct.yimg.com/cy/4680/38119766965_3e7117_64sq.jpg'}}]}]
[{'team_key': '375.l.573.t.7'}, {'team_id': '7'}, {'name': 'D1-pippo'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/7'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_03_100.png'}}]}, {'division_id': '4'}, {'waiver_priority': 9}, {'faab_balance': '0'}, {'number_of_moves': '42'}, {'number_of_trades': '5'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '0'}}, [], {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '201'}, {'auction_budget_spent': 201}, {'managers': [{'manager': {'manager_id': '7', 'nickname': 'pippo', 'guid': 'SRJTDXM7NCKJSWAWFGHDKMGP4U', 'is_commissioner': '1', 'email': 'pippona@ymail.com', 'image_url': 'https://s.yimg.com/wv/images/e1444b788688b4f24aa132deec3df84d_64.jpeg'}}]}]
[{'team_key': '375.l.573.t.8'}, {'team_id': '8'}, {'name': 'B5-Sin'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/8'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_01_100.png'}}]}, {'division_id': '2'}, {'waiver_priority': 6}, {'faab_balance': '43'}, {'number_of_moves': '34'}, {'number_of_trades': 0}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '1'}}, {'clinched_playoffs': 1}, {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '201'}, {'auction_budget_spent': 201}, {'managers': [{'manager': {'manager_id': '8', 'nickname': 'sin', 'guid': 'VYOYNLQKG4KJPP653GLEWIWTH4', 'email': 'sinfifa@163.com', 'image_url': 'https://ct.yimg.com/cy/4730/27437247689_968ccd_64sq.jpg'}}]}]
[{'team_key': '375.l.573.t.9'}, {'team_id': '9'}, {'name': 'B2-Jordan'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/9'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_01_100.png'}}]}, {'division_id': '2'}, {'waiver_priority': 8}, {'faab_balance': '12'}, {'number_of_moves': '64'}, {'number_of_trades': '4'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '0'}}, [], {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '196'}, {'auction_budget_spent': 195}, {'managers': [{'manager': {'manager_id': '9', 'nickname': 'Jordan', 'guid': 'PNSGFB66AWDITQED3PN5DGTTEI', 'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png'}}]}]
[{'team_key': '375.l.573.t.10'}, {'team_id': '10'}, {'name': 'B1-F.E.D.S'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/10'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://ct.yimg.com/cy/4449/26108207669_bb6800_192sq.jpg?ct=fantasy'}}]}, {'division_id': '2'}, {'waiver_priority': 17}, {'faab_balance': '30'}, {'number_of_moves': '50'}, {'number_of_trades': '2'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '1'}}, {'clinched_playoffs': 1}, {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '198'}, {'auction_budget_spent': 198}, {'managers': [{'manager': {'manager_id': '10', 'nickname': '民', 'guid': 'JO6JSRTPVO2SYDUXW6HOM5HLK4', 'is_commissioner': '1', 'email': 'caimin9@sohu.com', 'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png'}}]}]
[{'team_key': '375.l.573.t.11'}, {'team_id': '11'}, {'name': 'A4-dragonball'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/11'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://ct.yimg.com/cy/1687/25344958385_85325603cf_192sq.jpg?ct=fantasy'}}]}, {'division_id': '1'}, {'waiver_priority': 4}, {'faab_balance': '35'}, {'number_of_moves': '25'}, {'number_of_trades': '6'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '0'}}, [], {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '200'}, {'auction_budget_spent': 200}, {'managers': [{'manager': {'manager_id': '11', 'nickname': 'Zhu Heng', 'guid': 'K2RQUB4V4LHEX6UL6YYFLN64OU', 'email': '313554779@qq.com', 'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png'}}]}]
[{'team_key': '375.l.573.t.12'}, {'team_id': '12'}, {'name': 'C3-Lydia'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/12'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_01_100.png'}}]}, {'division_id': '3'}, {'waiver_priority': 2}, {'faab_balance': '0'}, {'number_of_moves': '28'}, {'number_of_trades': '4'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '0'}}, [], {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '200'}, {'auction_budget_spent': 198}, {'managers': [{'manager': {'manager_id': '12', 'nickname': 'Lydia', 'guid': 'HFMFRGGN5E7EI62HEGE7FT7A6Q', 'email': '16808774@qq.com', 'image_url': 'https://ct.yimg.com/cy/4473/37602919364_731a05_64sq.jpg'}}]}]
[{'team_key': '375.l.573.t.13'}, {'team_id': '13'}, {'name': 'B4-苦菜花'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/13'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_05_100.png'}}]}, {'division_id': '2'}, {'waiver_priority': 15}, {'faab_balance': '0'}, {'number_of_moves': '35'}, {'number_of_trades': '7'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '3'}}, [], {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '206'}, {'auction_budget_spent': 206}, {'managers': [{'manager': {'manager_id': '13', 'nickname': '虚拟', 'guid': 'BJLLFAFT6WB6YTIHMM64WTLNHA', 'email': 'clinton1982@sina.com', 'image_url': 'https://ct.yimg.com/cy/4498/37586704474_f93cd5_64sq.jpg'}}]}]
[{'team_key': '375.l.573.t.14'}, {'team_id': '14'}, {'name': 'D4-lebronjames'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/14'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_01_100.png'}}]}, {'division_id': '4'}, {'waiver_priority': 7}, {'faab_balance': '15'}, {'number_of_moves': '36'}, {'number_of_trades': '1'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '0'}}, [], {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '200'}, {'auction_budget_spent': 197}, {'managers': [{'manager': {'manager_id': '14', 'nickname': 'ted', 'guid': 'T2ZPHMM7ZSFY3PY3R2GXAVAVXQ', 'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png'}}]}]
[{'team_key': '375.l.573.t.15'}, {'team_id': '15'}, {'name': 'D5-unbe'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/15'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://ct.yimg.com/cy/1656/25214693492_db83b88754_192sq.jpg?ct=fantasy'}}]}, {'division_id': '4'}, {'waiver_priority': 5}, {'faab_balance': '37'}, {'number_of_moves': '29'}, {'number_of_trades': '2'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '0'}}, [], {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '204'}, {'auction_budget_spent': 204}, {'managers': [{'manager': {'manager_id': '15', 'nickname': 'unbelievable', 'guid': 'HGM27Q7E525UDSCWKAVEHRMPK4', 'email': 'cliffjiajia@163.com', 'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png'}}]}]
[{'team_key': '375.l.573.t.16'}, {'team_id': '16'}, {'name': 'A1-阿木'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/16'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_09_100.png'}}]}, {'division_id': '1'}, {'waiver_priority': 16}, {'faab_balance': '3'}, {'number_of_moves': '60'}, {'number_of_trades': '1'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '0'}}, [], {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '201'}, {'auction_budget_spent': 199}, {'managers': [{'manager': {'manager_id': '16', 'nickname': 'Huang', 'guid': 'KBQ3YFFP6AMJVVMCCDRKICNF74', 'is_commissioner': '1', 'email': 'crossmeteor@yahoo.com', 'image_url': 'https://ct.yimg.com/cy/4595/27369545699_a5cc12_64sq.jpg'}}]}]
[{'team_key': '375.l.573.t.17'}, {'team_id': '17'}, {'name': 'D2-天王'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/17'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_01_100.png'}}]}, {'division_id': '4'}, {'waiver_priority': 3}, {'faab_balance': '0'}, {'number_of_moves': '28'}, {'number_of_trades': '3'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '0'}}, [], {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '202'}, {'auction_budget_spent': 200}, {'managers': [{'manager': {'manager_id': '17', 'nickname': 'Chris', 'guid': 'HOI76OLNR7DUGA3N4IQFS4IWIQ', 'email': 'chrischan880223@yahoo.com', 'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png'}}]}]
[{'team_key': '375.l.573.t.18'}, {'team_id': '18'}, {'name': 'A5 - 鸡基'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/18'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://ct.yimg.com/cy/4447/26043029009_caa5f2_192sq.jpg?ct=fantasy'}}]}, {'division_id': '1'}, {'waiver_priority': 12}, {'faab_balance': '12'}, {'number_of_moves': '41'}, {'number_of_trades': '2'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '1'}}, [], {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '200'}, {'auction_budget_spent': 198}, {'managers': [{'manager': {'manager_id': '18', 'nickname': 'fd', 'guid': 'KHV7E4QK5YRS4COW2QCHAKEDCU', 'email': 'df87523@yahoo.com', 'image_url': 'https://ct.yimg.com/cy/4575/38153422014_9ce52c_64sq.jpg'}}, {'manager': {'manager_id': '21', 'nickname': 'Mars T', 'guid': 'R5ZTKEUC5DMSGCQTV3TIFWLMSI', 'is_comanager': '1', 'email': 'st-david@hotmail.com', 'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png'}}]}]
[{'team_key': '375.l.573.t.19'}, {'team_id': '19'}, {'name': 'B3-xiuxian'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/19'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_07_100.png'}}]}, {'division_id': '2'}, {'waiver_priority': 18}, {'faab_balance': '14'}, {'number_of_moves': '37'}, {'number_of_trades': '1'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '2'}}, {'clinched_playoffs': 1}, {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '198'}, {'auction_budget_spent': 198}, {'managers': [{'manager': {'manager_id': '19', 'nickname': 'LeiChen', 'guid': 'I6HNSBFPTRRXLMQ7P2SR6J57GQ', 'email': 'chenlei_th@hotmail.com', 'image_url': 'https://ct.yimg.com/cy/4690/37713810903_a49284_64sq.jpg'}}]}]
[{'team_key': '375.l.573.t.20'}, {'team_id': '20'}, {'name': 'D3-CP9'}, [], {'url': 'https://basketball.fantasysports.yahoo.com/nba/573/20'}, {'team_logos': [{'team_logo': {'size': 'large', 'url': 'https://s.yimg.com/dh/ap/fantasy/img/nba/icon_01_100.png'}}]}, {'division_id': '4'}, {'waiver_priority': 13}, {'faab_balance': '22'}, {'number_of_moves': '51'}, {'number_of_trades': '9'}, {'roster_adds': {'coverage_type': 'week', 'coverage_value': 21, 'value': '2'}}, [], {'league_scoring_type': 'head'}, [], [], {'has_draft_grade': 0}, {'auction_budget_total': '199'}, {'auction_budget_spent': 199}, {'managers': [{'manager': {'manager_id': '20', 'nickname': 'Richard', 'guid': 'KZG45PTB6KA2BZHEUJFLGF26WI', 'email': 'rhinoxlg@yahoo.com', 'image_url': 'https://s.yimg.com/wm/modern/images/default_user_profile_pic_64.png'}}]}]
Example to get team stats of week 2
In [283]:
stat_url = 'https://fantasysports.yahooapis.com/fantasy/v2/team/375.l.1039.t.17/stats;type=week;week=2'
resp = oauth_session.get(stat_url, params={'format': 'json'})
team_stats = resp.json()['fantasy_content']['team'][1]['team_stats']['stats']
team_stats
Out[283]:
[{'stat': {'stat_id': '9004003', 'value': '217/436'}},
{'stat': {'stat_id': '5', 'value': '.498'}},
{'stat': {'stat_id': '9007006', 'value': '90/108'}},
{'stat': {'stat_id': '8', 'value': '.833'}},
{'stat': {'stat_id': '10', 'value': '48'}},
{'stat': {'stat_id': '12', 'value': '572'}},
{'stat': {'stat_id': '13', 'value': '40'}},
{'stat': {'stat_id': '15', 'value': '191'}},
{'stat': {'stat_id': '16', 'value': '104'}},
{'stat': {'stat_id': '17', 'value': '42'}},
{'stat': {'stat_id': '18', 'value': '13'}},
{'stat': {'stat_id': '19', 'value': '63'}},
{'stat': {'stat_id': '20', 'value': '1.65'}}]
Example to get team stats of whole season
In [284]:
stat_url = 'https://fantasysports.yahooapis.com/fantasy/v2/team/375.l.1039.t.17/stats'
resp = oauth_session.get(stat_url, params={'format': 'json'})
team_stats = resp.json()['fantasy_content']['team'][1]['team_stats']['stats']
team_stats
Out[284]:
[{'stat': {'stat_id': '9004003', 'value': '3654/7730'}},
{'stat': {'stat_id': '5', 'value': '.473'}},
{'stat': {'stat_id': '9007006', 'value': '1586/2027'}},
{'stat': {'stat_id': '8', 'value': '.782'}},
{'stat': {'stat_id': '10', 'value': '765'}},
{'stat': {'stat_id': '12', 'value': '9659'}},
{'stat': {'stat_id': '13', 'value': '930'}},
{'stat': {'stat_id': '15', 'value': '3692'}},
{'stat': {'stat_id': '16', 'value': '1889'}},
{'stat': {'stat_id': '17', 'value': '639'}},
{'stat': {'stat_id': '18', 'value': '390'}},
{'stat': {'stat_id': '19', 'value': '1074'}},
{'stat': {'stat_id': '20', 'value': '1.76'}}]
Example to get game stat categories
In [285]:
stat_url = 'https://fantasysports.yahooapis.com/fantasy/v2/game/nba/stat_categories'
resp = oauth_session.get(stat_url, params={'format': 'json'})
stat_categories = resp.json()['fantasy_content']['game'][1]['stat_categories']['stats']
stat_categories
Out[285]:
[{'stat': {'display_name': 'GP',
'name': 'Games Played',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 0}},
{'stat': {'display_name': 'GS',
'name': 'Games Started',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 1}},
{'stat': {'display_name': 'MIN',
'name': 'Minutes Played',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 2}},
{'stat': {'display_name': 'FGA',
'name': 'Field Goals Attempted',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 3}},
{'stat': {'display_name': 'FGM',
'name': 'Field Goals Made',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 4}},
{'stat': {'base_stats': [{'base_stat': {'stat_id': '3'}},
{'base_stat': {'stat_id': '4'}}],
'display_name': 'FG%',
'is_composite_stat': 1,
'name': 'Field Goal Percentage',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 5}},
{'stat': {'display_name': 'FTA',
'name': 'Free Throws Attempted',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 6}},
{'stat': {'display_name': 'FTM',
'name': 'Free Throws Made',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 7}},
{'stat': {'base_stats': [{'base_stat': {'stat_id': '6'}},
{'base_stat': {'stat_id': '7'}}],
'display_name': 'FT%',
'is_composite_stat': 1,
'name': 'Free Throw Percentage',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 8}},
{'stat': {'display_name': '3PTA',
'name': '3-point Shots Attempted',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 9}},
{'stat': {'display_name': '3PTM',
'name': '3-point Shots Made',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 10}},
{'stat': {'base_stats': [{'base_stat': {'stat_id': '9'}},
{'base_stat': {'stat_id': '10'}}],
'display_name': '3PT%',
'is_composite_stat': 1,
'name': '3-point Percentage',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 11}},
{'stat': {'display_name': 'PTS',
'name': 'Points Scored',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 12}},
{'stat': {'display_name': 'OREB',
'name': 'Offensive Rebounds',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 13}},
{'stat': {'display_name': 'DREB',
'name': 'Defensive Rebounds',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 14}},
{'stat': {'display_name': 'REB',
'name': 'Total Rebounds',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 15}},
{'stat': {'display_name': 'AST',
'name': 'Assists',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 16}},
{'stat': {'display_name': 'ST',
'name': 'Steals',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 17}},
{'stat': {'display_name': 'BLK',
'name': 'Blocked Shots',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 18}},
{'stat': {'display_name': 'TO',
'name': 'Turnovers',
'position_types': [{'position_type': 'P'}],
'sort_order': '0',
'stat_id': 19}},
{'stat': {'base_stats': [{'base_stat': {'stat_id': '16'}},
{'base_stat': {'stat_id': '19'}}],
'display_name': 'A/T',
'is_composite_stat': 1,
'name': 'Assist/Turnover Ratio',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 20}},
{'stat': {'display_name': 'PF',
'name': 'Personal Fouls',
'position_types': [{'position_type': 'P'}],
'sort_order': '0',
'stat_id': 21}},
{'stat': {'display_name': 'DISQ',
'name': 'Times Fouled Out',
'position_types': [{'position_type': 'P'}],
'sort_order': '0',
'stat_id': 22}},
{'stat': {'display_name': 'TECH',
'name': 'Technical Fouls',
'position_types': [{'position_type': 'P'}],
'sort_order': '0',
'stat_id': 23}},
{'stat': {'display_name': 'EJCT',
'name': 'Ejections',
'position_types': [{'position_type': 'P'}],
'sort_order': '0',
'stat_id': 24}},
{'stat': {'display_name': 'FF',
'name': 'Flagrant Fouls',
'position_types': [{'position_type': 'P'}],
'sort_order': '0',
'stat_id': 25}},
{'stat': {'display_name': 'MPG',
'name': 'Minutes Per Game',
'sort_order': '1',
'stat_id': 26}},
{'stat': {'display_name': 'DD',
'name': 'Double-Doubles',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 27}},
{'stat': {'display_name': 'TD',
'name': 'Triple-Doubles',
'position_types': [{'position_type': 'P'}],
'sort_order': '1',
'stat_id': 28}}]
Content source: namiszh/fba
Similar notebooks: