Side-game data project / FPL data collection
-
- Grumpy Old Man
- Posts: 1028
- Joined: 14 Sep 2018, 18:28
Re: Side-game data project / FPL data collection
Not sure if exactly what you want, but I have last seasons by week and this season in grid format on my site
https://www.ffstuff.co.uk obviously under the fpl menu
This years grid has the goals assists etc from last year as fpl don’t wipe them until the new season starts, but value etc is obviously all current
Frank
https://www.ffstuff.co.uk obviously under the fpl menu
This years grid has the goals assists etc from last year as fpl don’t wipe them until the new season starts, but value etc is obviously all current
Frank
-
- Grumpy Old Man
- Posts: 1028
- Joined: 14 Sep 2018, 18:28
Re: Side-game data project / FPL data collection
Unsure if helpful but as per my last post I have the top 100, under fpl last year, click on a team to see their entire history
- kidzio
- Wideboy
- Posts: 53
- Joined: 06 Sep 2015, 14:42
Re: Side-game data project / FPL data collection
Thanks guys. I'm actually talking about the pages that Mav3rick created earlier in the thread, namely the GRID and league pages. Some Fiso leagues use those pages to compile the fpl managers results for their Fiso tourneys while I have used them in the past for my own special leagues. Hope it will be working again this season so that I can run my league again.
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
- Tacalabala
- FISO Knight
- Posts: 19010
- Joined: 07 Sep 2008, 01:03
- FPL:
Re: Side-game data project / FPL data collection
I've spoken to Mav recently, and he confirmed to me he'll make sure GRID and the league pages are working this season.
- kidzio
- Wideboy
- Posts: 53
- Joined: 06 Sep 2015, 14:42
Re: Side-game data project / FPL data collection
Great. I can't say enough thanks to him for the grid and league tools. Very helpful.
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
- Mav3rick
- FISO Jedi Knight
- Posts: 20858
- Joined: 20 Jul 2009, 20:35
- FS Record: FPL: 1082, 1201, 1800, 10203
The stats are dark and full of errors.
Re: Side-game data project / FPL data collection
Yeah I'll get them working again at some stage over the next month. The GRID itself may have to wait until after GW1 begins as the data may not be available until then, but I should be able to get the league tools running soon.
- kidzio
- Wideboy
- Posts: 53
- Joined: 06 Sep 2015, 14:42
Re: Side-game data project / FPL data collection
Thank you so much for the work!
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
- Stemania
- FISO Jedi Knight
- Posts: 20448
- Joined: 27 Aug 2006, 11:54
- Location: On the Iron Throne of xG, the seat of The Crown Prince of the Stat Perverts. Or if not, in the STC!
- FS Record: Best: TFF 321st. FPL 129th. FFS Career HoF Peak 2nd (Live 1st). Ability since lost.
- FPL:
Re: Side-game data project / FPL data collection
Talkie Toaster wrote: ↑28 Jun 2019, 20:52 fantasy.premierleague.com/api/leagues-classic/nnnn/standings
Have either of you two had success with this?
I hadn't realised the changes until running some python just now. It seems the api is hidden behind an authentication wall that my limited skills cannot overcome. My old way was equivalent to
Code: Select all
response = requests.get('https://fantasy.premierleague.com/api/leagues-classic/12683/standings?phase=1&ls-page=1)
-
- Dumbledore
- Posts: 7607
- Joined: 13 Oct 2005, 18:26
- Location: In hiding
- FPL:
Re: Side-game data project / FPL data collection
I’ve been using this no problem (PHP rather than Python):
$contents = file_get_contents('https://fantasy.premierleague.com/api/bootstrap-static/');
$contents = utf8_encode($contents);
$results = json_decode($contents, true);
$contents = file_get_contents('https://fantasy.premierleague.com/api/bootstrap-static/');
$contents = utf8_encode($contents);
$results = json_decode($contents, true);
- Talkie Toaster
- Grumpy Old Man
- Posts: 4427
- Joined: 11 Jul 2017, 15:43
- FPL:
Re: Side-game data project / FPL data collection
It looks like you need to be logged in to access league data now where it wasn't required before.
As you're using python this may help: https://medium.com/@bram.vanherle1/fant ... 7aeb2382e4
No good to me though as I'm using JS through a proxy, so I'll have to figure something else out.
As you're using python this may help: https://medium.com/@bram.vanherle1/fant ... 7aeb2382e4
No good to me though as I'm using JS through a proxy, so I'll have to figure something else out.
- Mav3rick
- FISO Jedi Knight
- Posts: 20858
- Joined: 20 Jul 2009, 20:35
- FS Record: FPL: 1082, 1201, 1800, 10203
The stats are dark and full of errors.
Re: Side-game data project / FPL data collection
I've not looked yet (have a week off work next week and will be updating the site then) but if you need to be authenticated then it's going to be a case of passing up some cookies with your request. You'll have to jump though a couple of hoops to get the cookie in the first place (by logging in basically and reading it from the login response, storing it in a variable somewhere and then passing it back in with your subsequent requests).
I'll have my own league parsers up and running soon, so if you can wait then you'll be able to use them with no authentication, otherwise that link posted by TT looks the right approach from a quick skim of the key points.
I'll have my own league parsers up and running soon, so if you can wait then you'll be able to use them with no authentication, otherwise that link posted by TT looks the right approach from a quick skim of the key points.
-
- Kevin and Perry
- Posts: 20
- Joined: 17 Jul 2017, 21:51
- FS Record: https://fantasy.premierleague.com/a/entry/698/history
Re: Side-game data project / FPL data collection
Thanks man!! The Grid is really a life saviour!!Mav3rick wrote: ↑29 Jul 2019, 21:23 I've not looked yet (have a week off work next week and will be updating the site then) but if you need to be authenticated then it's going to be a case of passing up some cookies with your request. You'll have to jump though a couple of hoops to get the cookie in the first place (by logging in basically and reading it from the login response, storing it in a variable somewhere and then passing it back in with your subsequent requests).
I'll have my own league parsers up and running soon, so if you can wait then you'll be able to use them with no authentication, otherwise that link posted by TT looks the right approach from a quick skim of the key points.
- Mav3rick
- FISO Jedi Knight
- Posts: 20858
- Joined: 20 Jul 2009, 20:35
- FS Record: FPL: 1082, 1201, 1800, 10203
The stats are dark and full of errors.
Re: Side-game data project / FPL data collection
I've today updated things like the league listing for both draft and classic fpl leagues:
https://ratemyteam.uk/Fiso/SideGameData/174846/1
https://ratemyteam.uk/Fiso/DraftLeague/10785
Things like the GRID, which rely on live GW data, are up and running but obviously don't contain any actual GW data yet so I'll have to double check they are working after the first update in GW1 (so probably sometime on next Saturday morning I aim to have the GRID working).
https://ratemyteam.uk/Fiso/GRID/174846
https://ratemyteam.uk/Fiso/SideGameData/174846/1
https://ratemyteam.uk/Fiso/DraftLeague/10785
Things like the GRID, which rely on live GW data, are up and running but obviously don't contain any actual GW data yet so I'll have to double check they are working after the first update in GW1 (so probably sometime on next Saturday morning I aim to have the GRID working).
https://ratemyteam.uk/Fiso/GRID/174846
- Mav3rick
- FISO Jedi Knight
- Posts: 20858
- Joined: 20 Jul 2009, 20:35
- FS Record: FPL: 1082, 1201, 1800, 10203
The stats are dark and full of errors.
Re: Side-game data project / FPL data collection
I'm aware that the links are broken at the moment, as I said in my previous post this is the first time I've been able to see the gameweek live data this season, so I'm currently working on applying any required fixes.
- Tacalabala
- FISO Knight
- Posts: 19010
- Joined: 07 Sep 2008, 01:03
- FPL:
Re: Side-game data project / FPL data collection
Cheer Mav, literally would be impossible without your input
- Mav3rick
- FISO Jedi Knight
- Posts: 20858
- Joined: 20 Jul 2009, 20:35
- FS Record: FPL: 1082, 1201, 1800, 10203
The stats are dark and full of errors.
Re: Side-game data project / FPL data collection
All done.
There was a minor rename on FPLs part where the name of the player id property for live GW data had changed from "element" to "id". Should be fixed now and the league pages will now include the current GW data. FPL don't seem to be setting a GW rank yet, so that's showing as "N/A" at the moment, but I think it will populate correctly as soon as FPL start setting it.
The GRID also looks to be working, although a lot of the fields are zero at the moment (transfers made etc) I did try to check that all the fields are still mapping correctly and it looks like they do, so hopefully it will carry on working once GW2 is underway and transfers have been made.
All these examples appear to be working, but let me know if you notice anything wrong. Things like chips are maybe the most likely to not be working so if you have any leagues where someone has BB or TC's then let me know if that's not showing as expected.
https://ratemyteam.uk/Fiso/SideGameData/174846/1
https://ratemyteam.uk/Fiso/DraftLeague/10785
https://ratemyteam.uk/Fiso/GRID/174846
There was a minor rename on FPLs part where the name of the player id property for live GW data had changed from "element" to "id". Should be fixed now and the league pages will now include the current GW data. FPL don't seem to be setting a GW rank yet, so that's showing as "N/A" at the moment, but I think it will populate correctly as soon as FPL start setting it.
The GRID also looks to be working, although a lot of the fields are zero at the moment (transfers made etc) I did try to check that all the fields are still mapping correctly and it looks like they do, so hopefully it will carry on working once GW2 is underway and transfers have been made.
All these examples appear to be working, but let me know if you notice anything wrong. Things like chips are maybe the most likely to not be working so if you have any leagues where someone has BB or TC's then let me know if that's not showing as expected.
https://ratemyteam.uk/Fiso/SideGameData/174846/1
https://ratemyteam.uk/Fiso/DraftLeague/10785
https://ratemyteam.uk/Fiso/GRID/174846
- Talkie Toaster
- Grumpy Old Man
- Posts: 4427
- Joined: 11 Jul 2017, 15:43
- FPL:
Re: Side-game data project / FPL data collection
Thanks Mav, looking good so far.
Here's an example with a couple of BBs working ok: https://ratemyteam.uk/Fiso/SideGameData/283660/1
I seem to remember this not picking up the FH chip last season though, so that may still be an issue later in the season.
The H2H League Link doesn't seem to be working https://ratemyteam.uk/Fiso/H2HData/166731, but I'm not sure if that gets used much anyway. (I don't use it).
Thanks again.
Here's an example with a couple of BBs working ok: https://ratemyteam.uk/Fiso/SideGameData/283660/1
I seem to remember this not picking up the FH chip last season though, so that may still be an issue later in the season.
The H2H League Link doesn't seem to be working https://ratemyteam.uk/Fiso/H2HData/166731, but I'm not sure if that gets used much anyway. (I don't use it).
Thanks again.
- Mav3rick
- FISO Jedi Knight
- Posts: 20858
- Joined: 20 Jul 2009, 20:35
- FS Record: FPL: 1082, 1201, 1800, 10203
The stats are dark and full of errors.
Re: Side-game data project / FPL data collection
Should be working now, just needed to authenticate when requesting the H2H data.Talkie Toaster wrote: ↑10 Aug 2019, 13:36 The H2H League Link doesn't seem to be working https://ratemyteam.uk/Fiso/H2HData/166731, but I'm not sure if that gets used much anyway. (I don't use it).
- andybarrell
- Dumbledore
- Posts: 8990
- Joined: 13 Oct 2005, 18:26
- Location: Southend-on-Sea
- FS Record: 2013 Licence to Kill Winner
2019 S15 R2 Championship Winner
2020 FISO H2H League 1 Winner
2020 5aSide Champions (Falcons) - FPL:
- Contact:
Re: Side-game data project / FPL data collection
just been reading the thread and would love to have the knowledge on how to use the "grid", unfortunately all i can do is a few simple excel calculations.
All the data for my Mirror game is manually entered, which as you can imagine is a tad time consuming.
Where do i get this "grid" from so i can look to see i can somehow use it
All the data for my Mirror game is manually entered, which as you can imagine is a tad time consuming.
Where do i get this "grid" from so i can look to see i can somehow use it
- kidzio
- Wideboy
- Posts: 53
- Joined: 06 Sep 2015, 14:42
Re: Side-game data project / FPL data collection
If you have been reading the thread, the link in right there in the post by Mav, posted 10 Aug. Just a few messages before this. Just click on it and you will be brought to the page.andybarrell wrote:just been reading the thread and would love to have the knowledge on how to use the "grid", unfortunately all i can do is a few simple excel calculations.
All the data for my Mirror game is manually entered, which as you can imagine is a tad time consuming.
Where do i get this "grid" from so i can look to see i can somehow use it
Sent from my iPhone using Tapatalk
- andybarrell
- Dumbledore
- Posts: 8990
- Joined: 13 Oct 2005, 18:26
- Location: Southend-on-Sea
- FS Record: 2013 Licence to Kill Winner
2019 S15 R2 Championship Winner
2020 FISO H2H League 1 Winner
2020 5aSide Champions (Falcons) - FPL:
- Contact:
- Mystery
- FISO Knight
- Posts: 13816
- Joined: 13 Oct 2005, 18:33
- Location: Just about here
- FS Record: 116th in TFF 05/06
- FPL:
- Contact:
Re: Side-game data project / FPL data collection
Does anyone have a neat way of getting player element IDs as used in [team]/event/[GW]/picks from something like bootstrap-static which now uses a different Code field. How can I link the two up?
- Mystery
- FISO Knight
- Posts: 13816
- Joined: 13 Oct 2005, 18:33
- Location: Just about here
- FS Record: 116th in TFF 05/06
- FPL:
- Contact:
Re: Side-game data project / FPL data collection
Never mind. Bootstrap-static has an ID as wellMystery wrote:Does anyone have a neat way of getting player element IDs as used in [team]/event/[GW]/picks from something like bootstrap-static which now uses a different Code field. How can I link the two up?
- eagle224
- Grumpy Old Man
- Posts: 2427
- Joined: 10 Nov 2005, 22:14
- Location: England
- FS Record: Veteran
- FPL:
Re: Side-game data project / FPL data collection
These are the links I've found to be working this year from https://fantasy.premierleague.com/api/...
If anyone knows of others, then please post too.
Waiting to see if /entry/{teamid}/cup/ is working again this year.
Code: Select all
/bootstrap-static/ Game settings and EPL player lists
/element-summary/{playerid}/ EPL player summary
/fixtures/ EPL team fixures
/fixtures/?event={gwk}/ EPL fixtures for a gameweek
/me/ User details + watchlist for logged in user
/my-team/{teamid}/ Current team selection
/event/{gwk}/live Gameweek current stats for EPL players
/entry/{teamid}/ User entry ID summary
/entry/{teamid}/history/ User entry ID history
/entry/{teamid}/transfers/ User entry ID transfer history
/entry/{teamid}/transfers-latest/ User current gameweek transfers
/entry/{teamid}/event/{gwk}/picks/ User gameweek selections
/leagues-classic/{leagueid}/ Users classic league details (must be a member)
/leagues-classic/{leagueid}/standings/ Users classic league standings (must be a member)
/leagues-h2h/{leagueid}/ Users classic league details (must be a member)
/leagues-h2h/{leagueid}/standings/ Users classic league standings (must be a member)
Waiting to see if /entry/{teamid}/cup/ is working again this year.
Last edited by eagle224 on 01 Oct 2019, 20:11, edited 4 times in total.
- MoSe
- Dumbledore
- Posts: 9550
- Joined: 10 Sep 2014, 12:25
- Location: next door S.Siro stadium
- FS Record: FISODAS CUP Winner Season 25
FISO H2H Winner: 15/16 Div2 - 16/17 Div1
FISO Mirror: 16/17 PL Winner
Re: Side-game data project / FPL data collection
So no /drf/ anymore?
- eagle224
- Grumpy Old Man
- Posts: 2427
- Joined: 10 Nov 2005, 22:14
- Location: England
- FS Record: Veteran
- FPL:
Re: Side-game data project / FPL data collection
This season they have changed the api URL from https://fantasy.premierleague.com/drf/... to https://fantasy.premierleague.com/api/...
Example: https://fantasy.premierleague.com/api/bootstrap-static/
(updated links post above to include url to api)
-
- Dumbledore
- Posts: 7607
- Joined: 13 Oct 2005, 18:26
- Location: In hiding
- FPL:
Re: Side-game data project / FPL data collection
Does anyone know how often/at what times the injury status is updated?
- RomynPG
- Dumbledore
- Posts: 9639
- Joined: 13 Oct 2005, 18:32
- FS Record: FPL 134 overall 06/07 ... never close since
- FPL:
Re: Side-game data project / FPL data collection
Does anyone know how I get classic league pages (not via browser)?
last year I used https://fantasy.premierleague.com/drf/l ... dings/xxxx and read above that that only works if logged in. How do I auth - I'm connecting from a php server.
Any assistance appreciated.
last year I used https://fantasy.premierleague.com/drf/l ... dings/xxxx and read above that that only works if logged in. How do I auth - I'm connecting from a php server.
Any assistance appreciated.
- Mav3rick
- FISO Jedi Knight
- Posts: 20858
- Joined: 20 Jul 2009, 20:35
- FS Record: FPL: 1082, 1201, 1800, 10203
The stats are dark and full of errors.
Re: Side-game data project / FPL data collection
RomynPG wrote: ↑16 Oct 2019, 23:56 Does anyone know how I get classic league pages (not via browser)?
last year I used https://fantasy.premierleague.com/drf/l ... dings/xxxx and read above that that only works if logged in. How do I auth - I'm connecting from a php server.
Any assistance appreciated.
You can get to the league standings via a URL in the following format:
Code: Select all
https://fantasy.premierleague.com/api/leagues-classic/{leagueId}/standings/?page_new_entries=1&page_standings={pageNumber}
https://medium.com/@bram.vanherle1/fant ... 7aeb2382e4
My code is C# so will probably be less use to you than Python examples, but if it helps I can post some sample code of my own.
- RomynPG
- Dumbledore
- Posts: 9639
- Joined: 13 Oct 2005, 18:32
- FS Record: FPL 134 overall 06/07 ... never close since
- FPL:
Re: Side-game data project / FPL data collection
Thanks Mav - that link looks pretty useful - (thx also TT for that)Mav3rick wrote: ↑17 Oct 2019, 16:38RomynPG wrote: ↑16 Oct 2019, 23:56 Does anyone know how I get classic league pages (not via browser)?
last year I used https://fantasy.premierleague.com/drf/l ... dings/xxxx and read above that that only works if logged in. How do I auth - I'm connecting from a php server.
Any assistance appreciated.
You can get to the league standings via a URL in the following format:
As you say, you will need to be logged in, that means posting to a login form and getting a cookie, which you then include on subsequent requests. TT posted a link above that works with Python but should give you enough info to figure out the equivalent php:Code: Select all
https://fantasy.premierleague.com/api/leagues-classic/{leagueId}/standings/?page_new_entries=1&page_standings={pageNumber}
https://medium.com/@bram.vanherle1/fant ... 7aeb2382e4
My code is C# so will probably be less use to you than Python examples, but if it helps I can post some sample code of my own.
Got to decide which route to take - code already hanging by a thread - excel so old it can't handle the encryption FPL uses - failed last year I think so now route requests via a server I use which is php.
I either do the login stuff so I can keep using the league pages for data or change my code to use data from individual team pages - both are a bit of a pain though.
ho hum ... busy busy as well.
One thought though looking at your ratemyteam pages they have everything I need ... do you have a json rather than html response version.
View Latest: 1 Day View Your posts