I am currently playing around with NBA API, and I want to be able to look at parts of games(score, period, etc.) that happened on a specified date. I want the output of what "https://data.nba.net/prod/v1/today.json" would return on any day during the NBA season, but I need to be able to choose the date, as the request no longer returns anything now that the season is over.
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} vs {away_team}, {clock}, {period}")
        break
get_scoreboard()
This is what I currently have, but nothing is printed as there isn't any games going on.
