获取今日NBA赛程、实时比分、比赛结果和当前赛季排名。用于用户询问今天的NBA比赛、实时NBA比分或比赛情况时。
Fetches live NBA data via the NBA CDN API (scoreboard) and StatMuse HTML (standings).
DataSourceToday's games & live scoreshttps://cdn.nba.com/static/json/liveData/scoreboard/todaysScoreboard_00.jsonStandings (East/West)StatMuse HTML tables — https://www.statmuse.com/nba/ask/nba-2025-26-eastern-conference-standingsFull schedulehttps://www.nba.com/schedule
Run the script from the skill directory:
bash
# Today's schedule + live scores
python scripts/nba_data.py scoreboard
# Current standings
python scripts/nba_data.py standings
# Both (default)
python scripts/nba_data.py all
On Linux/macOS:
bash
python3 scripts/nba_data.py all
scripts/nba_data.py#scoreboard — Fetches today's games from NBA CDN. Shows status (upcoming/live/final), scores, quarter/clock, and game leaders (pts/reb/ast).standings — Scrapes StatMuse for East + West conference tables: rank, team, W, L, pct, home record.all — Both commands combined.No API key required. Pure stdlib (urllib, json, re).
python scripts/nba_data.py all (set PYTHONIOENCODING=utf-8 on Windows first).python -c "from datetime import datetime; print(datetime.now().astimezone().tzinfo) to get timezone.https://www.nba.com/game/<gameId> for box scoreshttps://www.statmuse.com/nba for historical stats queries2025-26) may need updating at season start.https://www.statmuse.com/nba/ask/nba-YYYY-YY-[eastern|western]-conference-standings