返回顶部
f

football-data足球数据

|

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
808
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

football-data

足球数据

安装设置

首次使用前,检查CLI是否可用:
bash
which sports-skills || pip install sports-skills

如果pip install失败(包未找到或Python版本错误),从GitHub安装:
bash
pip install git+https://github.com/machina-sports/sports-skills.git

该包需要Python 3.10+。如果默认Python版本较旧,请使用特定版本:
bash
python3 --version # 检查版本

如果 < 3.10,尝试:python3.12 -m pip install sports-skills


在macOS上使用Homebrew:/opt/homebrew/bin/python3.12 -m pip install sports-skills

无需API密钥。

快速开始

推荐使用CLI——可避免Python导入路径问题:
bash
sports-skills football getdailyschedule
sports-skills football getseasonstandings --season_id=premier-league-2025

Python SDK(备选方案):
python
from sports_skills import football

standings = football.getseasonstandings(season_id=premier-league-2025)
schedule = football.getdailyschedule()

选择赛季

从系统提示的日期中推导当前年份(例如,currentDate: 2026-02-16 → 当前年份为2026)。

  • - 如果用户指定了赛季,直接使用。
  • 如果用户说当前、最新或未指定:调用getcurrentseason(competitionid=...)获取当前活跃的seasonid。不要猜测或硬编码年份。
  • 赛季格式:始终为{联赛-slug}-{年份}(例如,2025-26赛季为premier-league-2025)。年份是赛季的起始年份,而非结束年份。
  • MLS例外:MLS在一个自然年内进行春季-秋季赛程。使用getcurrentseason(competitionid=mls)——不要假设MLS遵循欧洲赛历。
  • 切勿硬编码seasonid。始终通过getcurrentseason()或系统日期推导。

联赛数据覆盖范围

并非所有数据都适用于每个联赛。请为正确的联赛使用正确的命令。

命令全部13个联赛仅前5大联赛仅英超
getseasonstandingsx
getdailyschedule
x | | |
| getseasonschedule | x | | |
| getseasonteams | x | | |
| search_team | x | | |
| getteamschedule | x | | |
| getteamprofile | x | | |
| geteventsummary | x | | |
| geteventlineups | x | | |
| geteventstatistics | x | | |
| geteventtimeline | x | | |
| getcurrentseason | x | | |
| get_competitions | x | | |
| geteventxg | | x | |
| geteventplayers_statistics (含xG) | | x | |
| getseasonleaders | | | x |
| getmissingplayers | | | x |

前5大联赛(Understat):英超、西甲、德甲、意甲、法甲。
仅英超(FPL):英超——伤病新闻、球员数据、所有权、ICT指数。
所有联赛:通过ESPN——比分、排名、赛程、比赛摘要、阵容、球队数据。
Transfermarkt:适用于任何拥有tmplayerid的球员——市场价值和转会历史。

注意:MLS使用不同的赛季结构(春季-秋季赛历)。使用getcurrentseason(competitionid=mls)检测正确的seasonid。

ID约定

  • - seasonid:{联赛-slug}-{年份},例如premier-league-2025、la-liga-2025
  • competitionid:联赛slug,例如premier-league、serie-a、champions-league
  • teamid:ESPN球队ID(数字字符串),例如359(阿森纳)、86(皇家马德里)
  • eventid:ESPN赛事ID(数字字符串),例如740847
  • fplid:FPL元素ID或代码(仅限英超球员)
  • tmplayer_id:Transfermarkt球员ID,例如433177(萨卡)、342229(姆巴佩)

命令

getcurrentseason

检测某个比赛的当前赛季。适用于所有联赛。
  • - competition_id(字符串,必填):比赛slug

返回data.competition和data.season:
json
{competition: {id: premier-league, name: Premier League}, season: {id: premier-league-2025, name: 2025-26 English Premier League, year: 2025}}

get_competitions

列出可用比赛及其当前赛季信息。无参数。适用于所有联赛。

返回包含id、name、code、current_season的data.competitions[]。

getcompetitionseasons

获取某个比赛的可用赛季。适用于所有联赛。
  • - competition_id(字符串,必填):比赛slug

getseasonschedule

获取完整赛季比赛赛程。适用于所有联赛。
  • - season_id(字符串,必填):赛季slug(例如,premier-league-2025)

返回data.schedules[]——形状与下方赛事相同。

getseasonstandings

获取某个赛季的联赛积分榜。适用于所有联赛。
  • - season_id(字符串,必填):赛季slug

返回data.standings[].entries[]:
json
{
position: 1,
team: {id: 359, name: Arsenal, short_name: Arsenal, abbreviation: ARS, crest: https://...},
played: 26, won: 17, drawn: 6, lost: 3,
goalsfor: 50, goalsagainst: 18, goal_difference: 32, points: 57
}

getseasonleaders

获取某个赛季的最佳射手/领先者。仅限英超(通过FPL)。
  • - season_id(字符串,必填):赛季slug(必须为premier-league-*)

返回data.leaders[]——注意:球员名称嵌套在.player.name下:
json
{
player: {id: 223094, name: Erling Haaland, firstname: Erling, lastname: Haaland, position: Forward},
team: {id: 43, name: Man City},
goals: 22, assists: 6, penalties: 0, played_matches: 25
}

非英超联赛返回空值。

getseasonteams

获取某个赛季的球队。适用于所有联赛。
  • - season_id(字符串,必填):赛季slug

search_team

在所有联赛(或特定联赛)中按名称搜索球队。使用模糊匹配。
  • - query(字符串,必填):要搜索的球队名称(例如,Corinthians、Barcelona、Man Utd)
  • competition_id(字符串,可选):将搜索限制在一个联赛内(例如,serie-a-brazil、premier-league)

返回包含每次匹配的team、competition和season的data.results[]:
json
{team: {id: 874, name: Corinthians}, competition: {id: serie-a-brazil, name: Serie A Brazil}, season: {id: serie-a-brazil-2025, year: 2025}}

getteamprofile

获取基本球队信息(名称、队徽、球场)。不返回阵容/球员名单——使用getseasonleaders查找英超球员ID,然后使用getplayerprofile获取个人球员数据。
  • - teamid(字符串,必填):ESPN球队ID
  • leagueslug(字符串,可选):联赛提示(加快解析速度)

返回data.team和data.venue。data.players[]为空——参见下方深入分析英超球队示例以了解推荐工作流程。

getdailyschedule

获取所有联赛特定日期的所有比赛。
  • - date(字符串,可选):YYYY-MM-DD格式的日期。默认为今天。

返回data.date和data.events[]:

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 football-data-1776292754 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 football-data-1776292754 技能

通过命令行安装

skillhub install football-data-1776292754

下载

⬇ 下载 football-data v0.1.0(免费)

文件大小: 12.47 KB | 发布时间: 2026-4-16 17:49

v0.1.0 最新 2026-4-16 17:49
Initial release of football-data skill — Football data across 13 major leagues.

- Provides access to standings, schedules, team and player profiles, match stats, xG, transfers, and more.
- No API keys or configuration required; works for Premier League, La Liga, Bundesliga, Serie A, Ligue 1, MLS, Champions League, World Cup, Championship, Eredivisie, Primeira Liga, Serie A Brazil, European Championship.
- Season and league detection logic included — recommends deriving season IDs via get_current_season.
- Clarifies which commands and data types are available for each league.
- Both CLI and Python SDK usage supported.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部