cfb-data
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCollege Football Data (CFB)
大学橄榄球数据(CFB)
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 # 检查版本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=8Important: 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 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 - Week-based schedule — like NFL, college football uses week numbers
大学橄榄球拥有750多支FBS球队(职业橄榄球NFL仅32支),按联盟而非分区组织:
- 排名按联盟划分——使用参数进行筛选
group - 排名替代联盟领袖——大学赛事采用AP前25排名和教练投票排名,而非全联盟数据领袖
- 排名球队在比分板对手信息中带有字段(值为null表示未排名)
rank - 按周程安排赛程——与NFL类似,大学橄榄球使用周数划分赛程
Conference IDs (group parameter)
联盟ID(group参数)
Use the parameter for standings and scoreboard filtering:
--group| Conference | Group ID | Conference | Group ID |
|---|---|---|---|
| ACC | 1 | Big 12 | 4 |
| SEC | 8 | Big Ten | 9 |
| Pac-12 | 15 | American | 151 |
| Mountain West | 17 | Sun Belt | 37 |
| MAC | 15 | Conference USA | 12 |
Tip: Conference IDs may change across seasons. Use without a group to see all conferences and their current structure.
get_standings使用参数筛选排名和比分板数据:
--group| 联盟 | 分组ID | 联盟 | 分组ID |
|---|---|---|---|
| ACC | 1 | Big 12 | 4 |
| SEC | 8 | Big Ten | 9 |
| Pac-12 | 15 | American | 151 |
| Mountain West | 17 | Sun Belt | 37 |
| MAC | 15 | Conference USA | 12 |
提示: 联盟ID可能会随赛季变化。若不指定group参数调用,可查看所有联盟及其当前结构。
get_standingsCommands
命令说明
get_scoreboard
get_scoreboard
Get live/recent college football scores.
- (str, optional): Date in YYYY-MM-DD format. Defaults to today.
date - (int, optional): CFB week number.
week - (int, optional): Conference group ID to filter.
group - (int, optional): Max events to return.
limit
获取实时/近期大学橄榄球比分。
- (字符串,可选):日期格式为YYYY-MM-DD,默认是今日。
date - (整数,可选):CFB赛事周数。
week - (整数,可选):联盟分组ID,用于筛选。
group - (整数,可选):返回的最大赛事数量。
limit
get_standings
get_standings
Get college football 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_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.
- (str, required): ESPN team ID.
team_id
获取某支大学橄榄球队的完整球员名单。
- (字符串,必填):ESPN球队ID。
team_id
get_team_schedule
get_team_schedule
Get schedule for a specific college football 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_game_summary
Get detailed game summary with box score, scoring plays, and leaders.
- (str, required): ESPN event ID.
event_id
获取详细赛事总结,包括技术统计、得分回合和数据领袖。
- (字符串,必填):ESPN赛事ID。
event_id
get_rankings
get_rankings
Get college football rankings — AP Top 25, Coaches Poll, CFP rankings.
- (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[]获取大学橄榄球排名——AP前25排名、教练投票排名和CFP排名。
- (整数,可选):赛季年份,默认是当前赛季。
season - (整数,可选):历史排名对应的周数。
week
返回结果包含数组,每个元素包含投票名称和数组,后者包含排名、上期排名、战绩、积分和第一选票数。
polls[]teams[]get_news
get_news
Get college football news articles.
- (str, optional): ESPN team ID to filter news by team.
team_id
获取大学橄榄球相关新闻文章。
- (字符串,可选):ESPN球队ID,用于按球队筛选新闻。
team_id
get_schedule
get_schedule
Get college football schedule by week.
- (int, optional): Season year. Defaults to current.
season - (int, optional): CFB week number.
week - (int, optional): Conference group ID to filter.
group
按周获取大学橄榄球赛程。
- (整数,可选):赛季年份,默认是当前赛季。
season - (整数,可选):CFB赛事周数。
week - (整数,可选):联盟分组ID,用于筛选。
group
Common Team IDs
常见球队ID
| Team | ID | Team | ID |
|---|---|---|---|
| Alabama | 333 | Ohio State | 194 |
| Georgia | 61 | Michigan | 130 |
| Texas | 251 | USC | 30 |
| Oregon | 2483 | Penn State | 213 |
| Clemson | 228 | LSU | 99 |
| Florida State | 52 | Oklahoma | 201 |
| Notre Dame | 87 | Tennessee | 2633 |
| Florida | 57 | Auburn | 2 |
Tip: Use to get all team IDs, or look up ESPN URLs (e.g., espn.com/college-football/team/_/id/333/alabama → ID is 333).
get_teams| 球队 | ID | 球队 | ID |
|---|---|---|---|
| Alabama | 333 | Ohio State | 194 |
| Georgia | 61 | Michigan | 130 |
| Texas | 251 | USC | 30 |
| Oregon | 2483 | Penn State | 213 |
| Clemson | 228 | LSU | 99 |
| Florida State | 52 | Oklahoma | 201 |
| Notre Dame | 87 | Tennessee | 2633 |
| Florida | 57 | Auburn | 2 |
提示: 可使用获取所有球队ID,或查看ESPN官网URL(例如espn.com/college-football/team/_/id/333/alabama → ID为333)。
get_teamsExamples
使用示例
User: "What are the college football rankings?"
bash
sports-skills cfb get_rankingsUser: "Show me SEC football standings"
bash
sports-skills cfb get_standings --group=8User: "What's Alabama's schedule this season?"
bash
sports-skills cfb get_team_schedule --team_id=333User: "Show me this week's college football scores"
bash
sports-skills cfb get_scoreboardUser: "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=401635800Error Handling
错误处理
When a command fails, do not surface raw errors to the user. Instead:
- If no events found for a date, check if it's in the off-season (CFB runs September–January)
- If standings are empty without a group filter, try with a specific conference group
- Only report failure with a clean message after exhausting alternatives
当命令执行失败时,请勿向用户展示原始错误信息。应按以下方式处理:
- 若指定日期无赛事,检查是否处于休赛期(CFB赛事时间为9月至次年1月)
- 若未指定group参数时排名结果为空,尝试使用特定联盟分组参数
- 在尝试所有替代方案后,仅向用户展示简洁的失败提示
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
故障排除
- command not found: Run
sports-skillspip install sports-skills - No games found: CFB is seasonal (Aug–Jan). Off-season scoreboard will be empty. Use or
get_rankingsyear-round.get_news - Too many teams: returns 750+ teams. Help users narrow down by suggesting specific team IDs.
get_teams - 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 - 球队数量过多:会返回750+支球队。可建议用户通过指定球队ID缩小范围。
get_teams - 休赛期排名为空:排名仅在赛季期间及休赛期初期发布。