NBA Stats
I'm trying to build a program that takes the stats of the NBA from the data.nba.net site and print out the stats. But, I keep getting an unassigned error, I'm still only mid-level, at best, at this and am just stuck. Any ideas? here is my code: from requests import get from pprint import PrettyPrinter Base_url = "https://data.nba.net" all_json = "/prod/v1/today.json" printer = PrettyPrinter() def get_links(): data = get(Base_url + all_json).json() links = data['links'] return links def get_Scoreboard(): scoreboard = get_links()['currentScoreboard'] games = get(Base_url + scoreboard).json()['games'] for game in games: home_team = game['hTeam'] away_team game['vTeam'] clock = game['clock'] period = game['period'] print("----------------------------------------") print(f"{home_team['triCode']} vs {away_team[triCode]},{clock}, {period}") get.scoreboard()