梦幻超级联赛 API [英] Fantasy Premier League API
问题描述
有谁知道梦幻英超联赛网站有没有API?找到了一些旧帖子,但链接不再有效.应用商店上有几个应用,所以一定有什么吗?
EDIT
似乎在 2019/2020 赛季,他们将 URL 从 drf
重命名为 api
.以下是新网址:
所有球员/球队数据及更多:
EDIT 2:您可以在此处查看 Python 实现示例,您可以从中获得有关某个联赛的有趣统计数据.您可以将其用作起点.https://github.com/spinach/FantasyPremierLeague-Api_Python
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 ?
解决方案EDIT
It seems for the 2019/2020 season, they renamed the URLs from
drf
toapi
. Here are the new URLS:All player/team data and more:
- 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/
ORIGINAL
These are new ones that currently work:
- 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
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).
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屋!