cbb-data
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCollege Basketball Data (CBB)
大学篮球数据(CBB)
Setup
安装配置
Before first use, check if the CLI is available:
bash
which sports-skills || pip install sports-skillsIf fails with a Python version error, the package requires Python 3.10+. Find a compatible Python:
pip installbash
python3 --version # check version首次使用前,检查CLI是否可用:
bash
which sports-skills || pip install sports-skills如果因Python版本错误失败,该包需要Python 3.10+。请找到兼容的Python版本:
pip installbash
python3 --version # check versionIf < 3.10, try: python3.12 -m pip install sports-skills
If < 3.10, try: python3.12 -m pip install sports-skills
On macOS with Homebrew: /opt/homebrew/bin/python3.12 -m pip install sports-skills
On macOS with Homebrew: /opt/homebrew/bin/python3.12 -m pip install sports-skills
No API keys required.无需API密钥。Quick Start
快速开始
Prefer the CLI — it avoids Python import path issues:
bash
sports-skills cbb get_scoreboard
sports-skills cbb get_rankings
sports-skills cbb get_standings --group=23推荐使用CLI——可避免Python导入路径问题:
bash
sports-skills cbb get_scoreboard
sports-skills cbb get_rankings
sports-skills cbb get_standings --group=23Important: College vs. Pro Differences
重要提示:大学篮球与职业篮球的差异
College basketball has 360+ D1 teams (vs 30 NBA teams), organized by conferences:
- Standings are per-conference — use the parameter to filter
group - Rankings replace leaders — college uses AP Top 25 and Coaches Poll instead of league-wide stat leaders
- Ranked teams have a field (null = unranked) on scoreboard competitors
rank - Many games per day — during the season, 50+ games can be scheduled daily
- March Madness — the NCAA Tournament runs in March/April with 68 teams
大学篮球拥有360多支一级联盟球队(而NBA只有30支),按联盟划分:
- 排名按联盟统计——使用参数进行筛选
group - 排行榜更新机制不同——大学篮球使用美联社TOP25和教练投票榜,而非联盟范围内的数据领跑者
- 排名球队在比分板上的参赛队伍字段中会有值(null表示未排名)
rank - 每日赛事众多——赛季期间,每天可能安排50多场比赛
- 疯狂三月——NCAA锦标赛于3月/4月举行,共有68支球队参赛
Conference IDs (group parameter)
联盟ID(group参数)
Use the parameter for standings and scoreboard filtering:
--group| Conference | Group ID | Conference | Group ID |
|---|---|---|---|
| ACC | 2 | Big 12 | 8 |
| SEC | 23 | Big Ten | 7 |
| Big East | 4 | Pac-12 | 21 |
| American | 62 | Mountain West | 44 |
| Atlantic 10 | 3 | West Coast | 26 |
| Missouri Valley | 18 | Colonial | 10 |
Tip: Conference IDs are different from CFB. Use without a group to see all conferences.
get_standings使用参数筛选排名和比分板数据:
--group| 联盟 | 组ID | 联盟 | 组ID |
|---|---|---|---|
| ACC | 2 | Big 12 | 8 |
| SEC | 23 | Big Ten | 7 |
| Big East | 4 | Pac-12 | 21 |
| American | 62 | Mountain West | 44 |
| Atlantic 10 | 3 | West Coast | 26 |
| Missouri Valley | 18 | Colonial | 10 |
提示: 联盟ID与大学橄榄球(CFB)不同。无需指定group参数调用即可查看所有联盟。
get_standingsCommands
命令列表
get_scoreboard
获取比分板
Get live/recent college basketball scores.
- (str, optional): Date in YYYY-MM-DD format. Defaults to today.
date - (int, optional): Conference group ID to filter.
group - (int, optional): Max events to return.
limit
获取实时/近期大学篮球比分。
- (字符串,可选):日期格式为YYYY-MM-DD,默认值为今日。
date - (整数,可选):联盟组ID,用于筛选。
group - (整数,可选):返回的最大赛事数量。
limit
get_standings
获取排名
Get college basketball standings by conference.
- (int, optional): Season year. Defaults to current.
season - (int, optional): Conference ID to filter (see table above).
group
按联盟获取大学篮球排名。
- (整数,可选):赛季年份,默认值为当前赛季。
season - (整数,可选):联盟ID,用于筛选(见上表)。
group
get_teams
获取所有球队
Get all D1 men's college basketball teams (360+ teams).
No parameters required.
获取所有一级联盟男子大学篮球队(360多支)。
无参数要求。
get_team_roster
获取球队阵容
Get full roster for a college basketball team.
- (str, required): ESPN team ID.
team_id
获取某支大学篮球队的完整阵容。
- (字符串,必填):ESPN球队ID。
team_id
get_team_schedule
获取球队赛程
Get schedule for a specific college basketball team.
- (str, required): ESPN team ID.
team_id - (int, optional): Season year. Defaults to current.
season
获取某支大学篮球队的赛程。
- (字符串,必填):ESPN球队ID。
team_id - (整数,可选):赛季年份,默认值为当前赛季。
season
get_game_summary
获取赛事总结
Get detailed game summary with box score and player stats.
- (str, required): ESPN event ID.
event_id
获取包含技术统计和球员数据的详细赛事总结。
- (字符串,必填):ESPN赛事ID。
event_id
get_rankings
获取排行榜
Get college basketball rankings — AP Top 25, Coaches Poll.
- (int, optional): Season year. Defaults to current.
season - (int, optional): Week number for historical rankings.
week
Returns with poll name and containing rank, previous rank, record, points, and first-place votes.
polls[]teams[]获取大学篮球排行榜——美联社TOP25、教练投票榜。
- (整数,可选):赛季年份,默认值为当前赛季。
season - (整数,可选):历史排行榜的周数。
week
返回包含投票名称的数组,以及包含排名、上期排名、战绩、积分和第一名得票的数组。
polls[]teams[]get_news
获取新闻
Get college basketball news articles.
- (str, optional): ESPN team ID to filter news by team.
team_id
获取大学篮球相关新闻文章。
- (字符串,可选):ESPN球队ID,用于按球队筛选新闻。
team_id
get_play_by_play
获取逐场战况
Get full play-by-play data for a game.
- (str, required): ESPN event ID
event_id
Returns play-by-play detail including period, clock, team, play description, and scoring plays.
获取某场比赛的完整逐场战况数据。
- (字符串,必填):ESPN赛事ID
event_id
返回包含时段、时钟、球队、战况描述和得分情况的逐场战况详情。
get_win_probability
获取获胜概率
Get win probability chart data for a game.
- (str, required): ESPN event ID
event_id
Returns timestamped home/away win probability percentages throughout the game.
获取某场比赛的获胜概率图表数据。
- (字符串,必填):ESPN赛事ID
event_id
返回比赛全程中带时间戳的主队/客队获胜概率百分比数据。
get_schedule
获取赛程
Get college basketball schedule.
- (str, optional): Date in YYYY-MM-DD format.
date - (int, optional): Season year. Defaults to current.
season - (int, optional): Conference group ID to filter.
group
获取大学篮球赛程。
- (字符串,可选):日期格式为YYYY-MM-DD。
date - (整数,可选):赛季年份,默认值为当前赛季。
season - (整数,可选):联盟组ID,用于筛选。
group
get_futures
获取期货赔率
Get college basketball futures/odds markets (National Championship, Player of the Year, etc.).
- (int, optional): Max entries per market. Defaults to 25.
limit - (int, optional): Season year. Defaults to current.
season_year
Returns with market name and entries (team/player name + odds value).
futures[]获取大学篮球期货/赔率市场数据(全国冠军、年度最佳球员等)。
- (整数,可选):每个市场返回的最大条目数,默认值为25。
limit - (整数,可选):赛季年份,默认值为当前赛季。
season_year
返回包含市场名称的数组,以及包含球队/球员名称+赔率值的条目。
futures[]get_team_stats
获取球队统计数据
Get full team statistical profile for a season.
- (str, required): ESPN team ID
team_id - (int, optional): Season year. Defaults to current.
season_year - (int, optional): 2=regular (default), 3=postseason.
season_type
Returns with detailed stats including value, rank, and per-game averages.
categories[]获取某支球队一个赛季的完整统计数据。
- (字符串,必填):ESPN球队ID
team_id - (整数,可选):赛季年份,默认值为当前赛季。
season_year - (整数,可选):2=常规赛(默认),3=季后赛。
season_type
返回包含详细统计数据的数组,包括数值、排名和场均数据。
categories[]get_player_stats
获取球员统计数据
Get full player statistical profile for a season.
- (str, required): ESPN athlete ID
player_id - (int, optional): Season year. Defaults to current.
season_year - (int, optional): 2=regular (default), 3=postseason.
season_type
Returns with detailed stats including value, rank, and per-game averages.
categories[]获取某名球员一个赛季的完整统计数据。
- (字符串,必填):ESPN运动员ID
player_id - (整数,可选):赛季年份,默认值为当前赛季。
season_year - (整数,可选):2=常规赛(默认),3=季后赛。
season_type
返回包含详细统计数据的数组,包括数值、排名和场均数据。
categories[]Common Team IDs
常用球队ID
| Team | ID | Team | ID |
|---|---|---|---|
| Duke | 150 | Kansas | 2305 |
| Kentucky | 96 | North Carolina | 153 |
| UConn | 41 | Gonzaga | 2250 |
| Villanova | 222 | UCLA | 26 |
| Michigan State | 127 | Arizona | 12 |
| Purdue | 2509 | Houston | 248 |
| Tennessee | 2633 | Auburn | 2 |
| Baylor | 239 | Creighton | 156 |
Tip: Use to get all team IDs, or look up ESPN URLs (e.g., espn.com/mens-college-basketball/team/_/id/150/duke → ID is 150).
get_teams| 球队 | ID | 球队 | ID |
|---|---|---|---|
| Duke | 150 | Kansas | 2305 |
| Kentucky | 96 | North Carolina | 153 |
| UConn | 41 | Gonzaga | 2250 |
| Villanova | 222 | UCLA | 26 |
| Michigan State | 127 | Arizona | 12 |
| Purdue | 2509 | Houston | 248 |
| Tennessee | 2633 | Auburn | 2 |
| Baylor | 239 | Creighton | 156 |
提示: 使用获取所有球队ID,或查看ESPN网址(例如:espn.com/mens-college-basketball/team/_/id/150/duke → ID为150)。
get_teamsExamples
使用示例
User: "What are the college basketball rankings?"
bash
sports-skills cbb get_rankingsUser: "Show me SEC basketball standings"
bash
sports-skills cbb get_standings --group=23User: "What are today's college basketball scores?"
bash
sports-skills cbb get_scoreboardUser: "Show me Duke's roster"
bash
sports-skills cbb get_team_roster --team_id=150User: "Get the box score for game 401638574"
bash
sports-skills cbb get_game_summary --event_id=401638574User: "What's Kansas's schedule this season?"
bash
sports-skills cbb get_team_schedule --team_id=2305User: "Who's favored to win March Madness?"
bash
sports-skills cbb get_futures --limit=10User: "Show me Duke's team stats"
bash
sports-skills cbb get_team_stats --team_id=150用户:"大学篮球排行榜是怎样的?"
bash
sports-skills cbb get_rankings用户:"展示SEC联盟的篮球排名"
bash
sports-skills cbb get_standings --group=23用户:"今天的大学篮球比分是多少?"
bash
sports-skills cbb get_scoreboard用户:"展示Duke的阵容"
bash
sports-skills cbb get_team_roster --team_id=150用户:"获取赛事401638574的技术统计"
bash
sports-skills cbb get_game_summary --event_id=401638574用户:"Kansas本赛季的赛程是怎样的?"
bash
sports-skills cbb get_team_schedule --team_id=2305用户:"谁最有可能赢得疯狂三月?"
bash
sports-skills cbb get_futures --limit=10用户:"展示Duke的球队统计数据"
bash
sports-skills cbb get_team_stats --team_id=150Error Handling
错误处理
When a command fails, do not surface raw errors to the user. Instead:
- If no events found, check if it's the off-season (CBB runs November–April)
- If standings are empty without a group filter, try a specific conference
- During March Madness, the scoreboard will have tournament games
- Only report failure with a clean message after exhausting alternatives
当命令执行失败时,不要向用户显示原始错误信息。请按以下步骤处理:
- 如果未找到赛事,请检查是否处于休赛期(大学篮球赛季为11月至次年4月)
- 如果未指定组参数时排名为空,请尝试筛选特定联盟
- 疯狂三月期间,比分板将显示锦标赛赛事
- 在尝试所有替代方案后,仅用简洁的消息告知用户执行失败
Season Structure
赛季结构
- Non-Conference Season: November – December
- Conference Play: January – early March
- Conference Tournaments: Early–mid March
- NCAA Tournament (March Madness): Mid-March – early April
- First Four, First/Second Round, Sweet 16, Elite 8, Final Four, Championship
- 非联盟赛季:11月 – 12月
- 联盟常规赛:1月 – 3月初
- 联盟锦标赛:3月上旬至中旬
- NCAA锦标赛(疯狂三月):3月中旬 – 4月初
- 首轮资格赛、第一/第二轮、甜蜜16强、精英8强、最终4强、总决赛
Troubleshooting
故障排除
- command not found: Run
sports-skillspip install sports-skills - No games found: CBB is seasonal (Nov–Apr). Off-season scoreboard will be empty.
- Too many games: During the season, 50+ games per day. Use to filter by conference or
--groupto cap results.--limit - Rankings empty in off-season: Rankings are published weekly during the season (November–March).
- Roster format differs from NBA: College rosters may be a flat list instead of positional groups.
- 命令未找到:运行
sports-skillspip install sports-skills - 未找到赛事:大学篮球是季节性赛事(11月–4月)。休赛期比分板将为空。
- 赛事过多:赛季期间,每天可能有50多场比赛。使用按联盟筛选,或使用
--group限制结果数量。--limit - 休赛期排行榜为空:排行榜在赛季期间每周发布(11月–3月)。
- 阵容格式与NBA不同:大学篮球阵容可能是扁平列表,而非按位置分组。