梦幻英超API [英] Fantasy Premier League API
问题描述
有人知道幻想英超联赛网站是否有API吗?找到了一些旧帖子,但链接不再起作用.应用商店上有几个应用,所以一定要有东西吗?
Does anyone know if there is an API for the fantasy Premier league website? Found a few old posts but the links don't work anymore. There are a couple of apps on the app store so must be something ?
推荐答案
编辑
似乎在2019/2020赛季,他们将URL从drf
重命名为api
.这是新的URL:
It seems for the 2019/2020 season, they renamed the URLs from drf
to api
. Here are the new URLS:
所有球员/球队数据以及更多信息:
All player/team data and more:
- https://fantasy.premierleague.com/api/bootstrap-static/
- 特定玩家: https://fantasy.premierleague.com/api/element-summary/[player_id]/
- 第一个玩家示例: https://fantasy.premierleague.com/api/element-summary/1/
- https://fantasy.premierleague.com/api/bootstrap-static/
- Specific player: https://fantasy.premierleague.com/api/element-summary/[player_id]/
- Example first player: https://fantasy.premierleague.com/api/element-summary/1/
原始
这些是目前可以使用的新功能:
These are new ones that currently work:
- 所有球员/球队数据及更多信息: https://fantasy.premierleague.com/drf/bootstrap-static
- 特定玩家: https://fantasy.premierleague.com/drf/element-summary/[player_id]
- Ospina示例: https://fantasy.premierleague.com/drf/element-摘要/1
- All player/team data and more: https://fantasy.premierleague.com/drf/bootstrap-static
- Specific player: https://fantasy.premierleague.com/drf/element-summary/[player_id]
- Example Ospina: https://fantasy.premierleague.com/drf/element-summary/1
编辑: 要了解有关链接的信息,您可以检查由fpl网站客户端调用的API. 在Chrome上,查看->开发人员->开发人员工具.然后单击网络选项卡.之后,单击您团队中的球员信息,然后在网络"选项卡上查看正在拨打的电话(请参见下图).
EDIT: To find out about the links, you can check the APIs called by the fpl website client. On Chrome, go to view -> developer -> developer tools. Then click on the network tab. After that, click on a player info in your team, and check the call that is being made on the network tab (see pic below).
编辑2 :您可以在此处看到一个Python实现示例,您可以在其中获得有关某个联赛的有趣统计信息.您可以将其用作起点. https://github.com/spinach/FantasyPremierLeague-Api_Python
EDIT 2: You can see an example of implementation in Python here where you get interesting statistics about a certain league. You can use it as a starting point. https://github.com/spinach/FantasyPremierLeague-Api_Python
这篇关于梦幻英超API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!