To see less ads Register or Login ----- Daily Fantasy Sports games 18+

Side-game data project / FPL data collection

A Forum for all Fantasy PremierLeague.com (FPL) Links, Mini-Leagues and Side Games (i.e. inter-FISO competitions run by FISO users)
Post Reply
ffstuff
Grumpy Old Man
Posts: 1028
Joined: 14 Sep 2018, 18:28

Re: Side-game data project / FPL data collection

Post by ffstuff »

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

ffstuff
Grumpy Old Man
Posts: 1028
Joined: 14 Sep 2018, 18:28

Re: Side-game data project / FPL data collection

Post by ffstuff »

RomynPG wrote: 05 Jul 2018, 16:55 Darn it - anticipating the new season wouldn't kick off until after the World Cup I'd pegged some time over this weekend to grab all the data MoSe mentioned above along with detailed squad data for all known FISOers.

:roll:
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

User avatar
kidzio
Wideboy
Posts: 53
Joined: 06 Sep 2015, 14:42

Re: Side-game data project / FPL data collection

Post by kidzio »

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

User avatar
Tacalabala
FISO Knight
Posts: 19010
Joined: 07 Sep 2008, 01:03

Re: Side-game data project / FPL data collection

Post by Tacalabala »

I've spoken to Mav recently, and he confirmed to me he'll make sure GRID and the league pages are working this season.

User avatar
kidzio
Wideboy
Posts: 53
Joined: 06 Sep 2015, 14:42

Re: Side-game data project / FPL data collection

Post by kidzio »

Great. I can't say enough thanks to him for the grid and league tools. Very helpful.


Sent from my iPhone using Tapatalk

User avatar
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

Post by Mav3rick »

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.

User avatar
kidzio
Wideboy
Posts: 53
Joined: 06 Sep 2015, 14:42

Re: Side-game data project / FPL data collection

Post by kidzio »

Thank you so much for the work!


Sent from my iPhone using Tapatalk

User avatar
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.

Re: Side-game data project / FPL data collection

Post by Stemania »

Talkie Toaster wrote: 28 Jun 2019, 20:52 fantasy.premierleague.com/api/leagues-classic/nnnn/standings
Mav3rick wrote: 29 Jun 2019, 09:48 Yeah I'll get them working again at some stage over the next month.
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) 
but gets me nada but an error message now.

bspittles
Dumbledore
Posts: 7607
Joined: 13 Oct 2005, 18:26
Location: In hiding

Re: Side-game data project / FPL data collection

Post by bspittles »

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);

User avatar
Talkie Toaster
Grumpy Old Man
Posts: 4427
Joined: 11 Jul 2017, 15:43

Re: Side-game data project / FPL data collection

Post by Talkie Toaster »

It looks like you need to be logged in to access league data now where it wasn't required before. :x

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. :roll:

User avatar
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

Post by Mav3rick »

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.

rohitpotter
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

Post by rohitpotter »

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.
Thanks man!! The Grid is really a life saviour!!

User avatar
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

Post by Mav3rick »

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

User avatar
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

Post by Mav3rick »

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.

User avatar
Tacalabala
FISO Knight
Posts: 19010
Joined: 07 Sep 2008, 01:03

Re: Side-game data project / FPL data collection

Post by Tacalabala »

Cheer Mav, literally would be impossible without your input :)

User avatar
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

Post by Mav3rick »

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

User avatar
Talkie Toaster
Grumpy Old Man
Posts: 4427
Joined: 11 Jul 2017, 15:43

Re: Side-game data project / FPL data collection

Post by Talkie Toaster »

Thanks Mav, looking good so far. :D

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. :D

User avatar
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

Post by Mav3rick »

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).
Should be working now, just needed to authenticate when requesting the H2H data.

User avatar
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)
Contact:

Re: Side-game data project / FPL data collection

Post by andybarrell »

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

User avatar
kidzio
Wideboy
Posts: 53
Joined: 06 Sep 2015, 14:42

Re: Side-game data project / FPL data collection

Post by kidzio »

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
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.


Sent from my iPhone using Tapatalk

User avatar
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)
Contact:

Re: Side-game data project / FPL data collection

Post by andybarrell »

ok, cheers

User avatar
Mystery
FISO Knight
Posts: 13816
Joined: 13 Oct 2005, 18:33
Location: Just about here
FS Record: 116th in TFF 05/06
Contact:

Re: Side-game data project / FPL data collection

Post by Mystery »

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?

User avatar
Mystery
FISO Knight
Posts: 13816
Joined: 13 Oct 2005, 18:33
Location: Just about here
FS Record: 116th in TFF 05/06
Contact:

Re: Side-game data project / FPL data collection

Post by Mystery »

Mystery 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?
Never mind. Bootstrap-static has an ID as well

User avatar
eagle224
Grumpy Old Man
Posts: 2427
Joined: 10 Nov 2005, 22:14
Location: England
FS Record: Veteran

Re: Side-game data project / FPL data collection

Post by eagle224 »

These are the links I've found to be working this year from https://fantasy.premierleague.com/api/...

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)
If anyone knows of others, then please post too.

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.

User avatar
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

Post by MoSe »

So no /drf/ anymore?

User avatar
eagle224
Grumpy Old Man
Posts: 2427
Joined: 10 Nov 2005, 22:14
Location: England
FS Record: Veteran

Re: Side-game data project / FPL data collection

Post by eagle224 »

MoSe wrote: 18 Aug 2019, 01:20 So no /drf/ anymore?
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)

bspittles
Dumbledore
Posts: 7607
Joined: 13 Oct 2005, 18:26
Location: In hiding

Re: Side-game data project / FPL data collection

Post by bspittles »

Does anyone know how often/at what times the injury status is updated?

User avatar
RomynPG
Dumbledore
Posts: 9639
Joined: 13 Oct 2005, 18:32
FS Record: FPL 134 overall 06/07 ... never close since

Re: Side-game data project / FPL data collection

Post by RomynPG »

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.

User avatar
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

Post by Mav3rick »

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}
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:

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.

User avatar
RomynPG
Dumbledore
Posts: 9639
Joined: 13 Oct 2005, 18:32
FS Record: FPL 134 overall 06/07 ... never close since

Re: Side-game data project / FPL data collection

Post by RomynPG »

Mav3rick wrote: 17 Oct 2019, 16:38
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}
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:

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.
Thanks Mav - that link looks pretty useful - (thx also TT for that)

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
Post Reply

Return to “FPL Links, Mini-Leagues & Side Games”