cfb-data

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

College Football Data (CFB)

大学橄榄球数据(CFB)

Setup

设置

Before first use, check if the CLI is available:
bash
which sports-skills || pip install sports-skills
If
pip install
fails with a Python version error, the package requires Python 3.10+. Find a compatible Python:
bash
python3 --version  # check version
首次使用前,检查CLI是否可用:
bash
which sports-skills || pip install sports-skills
如果
pip install
因Python版本错误失败,说明该包需要Python 3.10及以上版本。请找到兼容的Python版本:
bash
python3 --version  # 检查版本

If < 3.10, try: python3.12 -m pip install sports-skills

若版本<3.10,尝试:python3.12 -m pip install sports-skills

On macOS with Homebrew: /opt/homebrew/bin/python3.12 -m pip install sports-skills

在使用Homebrew的macOS上:/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 cfb get_scoreboard
sports-skills cfb get_rankings
sports-skills cfb get_standings --group=8
推荐使用CLI——它可以避免Python导入路径问题:
bash
sports-skills cfb get_scoreboard
sports-skills cfb get_rankings
sports-skills cfb get_standings --group=8

Important: College vs. Pro Differences

重要提示:大学橄榄球与职业橄榄球的区别

College football has 750+ FBS teams (vs 32 NFL teams), organized by conferences rather than divisions:
  • Standings are per-conference — use the
    group
    parameter to filter
  • Rankings replace leaders — college uses AP Top 25 and Coaches Poll instead of league-wide stat leaders
  • Ranked teams have a
    rank
    field (null = unranked) on scoreboard competitors
  • Week-based schedule — like NFL, college football uses week numbers
大学橄榄球拥有750多支FBS球队(职业橄榄球NFL仅32支),按联盟而非分区组织:
  • 排名按联盟划分——使用
    group
    参数进行筛选
  • 排名替代联盟领袖——大学赛事采用AP前25排名和教练投票排名,而非全联盟数据领袖
  • 排名球队在比分板对手信息中带有
    rank
    字段(值为null表示未排名)
  • 按周程安排赛程——与NFL类似,大学橄榄球使用周数划分赛程

Conference IDs (group parameter)

联盟ID(group参数)

Use the
--group
parameter for standings and scoreboard filtering:
ConferenceGroup IDConferenceGroup ID
ACC1Big 124
SEC8Big Ten9
Pac-1215American151
Mountain West17Sun Belt37
MAC15Conference USA12
Tip: Conference IDs may change across seasons. Use
get_standings
without a group to see all conferences and their current structure.
使用
--group
参数筛选排名和比分板数据:
联盟分组ID联盟分组ID
ACC1Big 124
SEC8Big Ten9
Pac-1215American151
Mountain West17Sun Belt37
MAC15Conference USA12
提示: 联盟ID可能会随赛季变化。若不指定group参数调用
get_standings
,可查看所有联盟及其当前结构。

Commands

命令说明

get_scoreboard

get_scoreboard

Get live/recent college football scores.
  • date
    (str, optional): Date in YYYY-MM-DD format. Defaults to today.
  • week
    (int, optional): CFB week number.
  • group
    (int, optional): Conference group ID to filter.
  • limit
    (int, optional): Max events to return.
获取实时/近期大学橄榄球比分。
  • date
    (字符串,可选):日期格式为YYYY-MM-DD,默认是今日。
  • week
    (整数,可选):CFB赛事周数。
  • group
    (整数,可选):联盟分组ID,用于筛选。
  • limit
    (整数,可选):返回的最大赛事数量。

get_standings

get_standings

Get college football standings by conference.
  • season
    (int, optional): Season year. Defaults to current.
  • group
    (int, optional): Conference ID to filter (see table above).
获取各联盟的大学橄榄球排名。
  • season
    (整数,可选):赛季年份,默认是当前赛季。
  • group
    (整数,可选):联盟ID,用于筛选(见上表)。

get_teams

get_teams

Get all FBS college football teams (750+ teams). No parameters required.
获取所有FBS大学橄榄球队(750+支)。 无必填参数。

get_team_roster

get_team_roster

Get full roster for a college football team.
  • team_id
    (str, required): ESPN team ID.
获取某支大学橄榄球队的完整球员名单。
  • team_id
    (字符串,必填):ESPN球队ID。

get_team_schedule

get_team_schedule

Get schedule for a specific college football team.
  • team_id
    (str, required): ESPN team ID.
  • season
    (int, optional): Season year. Defaults to current.
获取某支大学橄榄球队的赛程。
  • team_id
    (字符串,必填):ESPN球队ID。
  • season
    (整数,可选):赛季年份,默认是当前赛季。

get_game_summary

get_game_summary

Get detailed game summary with box score, scoring plays, and leaders.
  • event_id
    (str, required): ESPN event ID.
获取详细赛事总结,包括技术统计、得分回合和数据领袖。
  • event_id
    (字符串,必填):ESPN赛事ID。

get_rankings

get_rankings

Get college football rankings — AP Top 25, Coaches Poll, CFP rankings.
  • season
    (int, optional): Season year. Defaults to current.
  • week
    (int, optional): Week number for historical rankings.
Returns
polls[]
with poll name and
teams[]
containing rank, previous rank, record, points, and first-place votes.
获取大学橄榄球排名——AP前25排名、教练投票排名和CFP排名。
  • season
    (整数,可选):赛季年份,默认是当前赛季。
  • week
    (整数,可选):历史排名对应的周数。
返回结果包含
polls[]
数组,每个元素包含投票名称和
teams[]
数组,后者包含排名、上期排名、战绩、积分和第一选票数。

get_news

get_news

Get college football news articles.
  • team_id
    (str, optional): ESPN team ID to filter news by team.
获取大学橄榄球相关新闻文章。
  • team_id
    (字符串,可选):ESPN球队ID,用于按球队筛选新闻。

get_schedule

get_schedule

Get college football schedule by week.
  • season
    (int, optional): Season year. Defaults to current.
  • week
    (int, optional): CFB week number.
  • group
    (int, optional): Conference group ID to filter.
按周获取大学橄榄球赛程。
  • season
    (整数,可选):赛季年份,默认是当前赛季。
  • week
    (整数,可选):CFB赛事周数。
  • group
    (整数,可选):联盟分组ID,用于筛选。

Common Team IDs

常见球队ID

TeamIDTeamID
Alabama333Ohio State194
Georgia61Michigan130
Texas251USC30
Oregon2483Penn State213
Clemson228LSU99
Florida State52Oklahoma201
Notre Dame87Tennessee2633
Florida57Auburn2
Tip: Use
get_teams
to get all team IDs, or look up ESPN URLs (e.g., espn.com/college-football/team/_/id/333/alabama → ID is 333).
球队ID球队ID
Alabama333Ohio State194
Georgia61Michigan130
Texas251USC30
Oregon2483Penn State213
Clemson228LSU99
Florida State52Oklahoma201
Notre Dame87Tennessee2633
Florida57Auburn2
提示: 可使用
get_teams
获取所有球队ID,或查看ESPN官网URL(例如espn.com/college-football/team/_/id/333/alabama → ID为333)。

Examples

使用示例

User: "What are the college football rankings?"
bash
sports-skills cfb get_rankings
User: "Show me SEC football standings"
bash
sports-skills cfb get_standings --group=8
User: "What's Alabama's schedule this season?"
bash
sports-skills cfb get_team_schedule --team_id=333
User: "Show me this week's college football scores"
bash
sports-skills cfb get_scoreboard
User: "Get the box score for game 401635800"
bash
sports-skills cfb get_game_summary --event_id=401635800
用户:“当前大学橄榄球排名是多少?”
bash
sports-skills cfb get_rankings
用户:“展示SEC联盟橄榄球排名”
bash
sports-skills cfb get_standings --group=8
用户:“阿拉巴马队本赛季的赛程是什么?”
bash
sports-skills cfb get_team_schedule --team_id=333
用户:“展示本周大学橄榄球的比分”
bash
sports-skills cfb get_scoreboard
用户:“获取赛事ID为401635800的技术统计”
bash
sports-skills cfb get_game_summary --event_id=401635800

Error Handling

错误处理

When a command fails, do not surface raw errors to the user. Instead:
  1. If no events found for a date, check if it's in the off-season (CFB runs September–January)
  2. If standings are empty without a group filter, try with a specific conference group
  3. Only report failure with a clean message after exhausting alternatives
当命令执行失败时,请勿向用户展示原始错误信息。应按以下方式处理:
  1. 若指定日期无赛事,检查是否处于休赛期(CFB赛事时间为9月至次年1月)
  2. 若未指定group参数时排名结果为空,尝试使用特定联盟分组参数
  3. 在尝试所有替代方案后,仅向用户展示简洁的失败提示

Season Structure

赛季结构

  • Regular Season: Late August – early December (Weeks 1–15)
  • Conference Championships: Early December
  • Bowl Season: Mid-December – early January
  • College Football Playoff: December – January
  • 常规赛:8月末至12月初(第1至15周)
  • 联盟冠军赛:12月初
  • 碗赛阶段:12月中旬至次年1月初
  • 大学橄榄球季后赛(CFP):12月至次年1月

Troubleshooting

故障排除

  • sports-skills
    command not found
    : Run
    pip install sports-skills
  • No games found: CFB is seasonal (Aug–Jan). Off-season scoreboard will be empty. Use
    get_rankings
    or
    get_news
    year-round.
  • Too many teams:
    get_teams
    returns 750+ teams. Help users narrow down by suggesting specific team IDs.
  • Rankings empty in off-season: Rankings are only published during the season and early off-season.
  • sports-skills
    命令未找到
    :执行
    pip install sports-skills
    重新安装
  • 未找到赛事:CFB为季节性赛事(8月至次年1月)。休赛期比分板将为空,可全年使用
    get_rankings
    get_news
    获取数据。
  • 球队数量过多
    get_teams
    会返回750+支球队。可建议用户通过指定球队ID缩小范围。
  • 休赛期排名为空:排名仅在赛季期间及休赛期初期发布。