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

Greasemonkey script to display team data on FPL league page

A Fantasy Football forum for news on fantasy football games run by the Premierleague (FPL).
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: Greasemonkey script to display team data on FPL league page

Post by andybarrell »

i had better fpl running as well, after disabling that it now works again, however i used to be able to see the next 5 fixtures difficulties on team page in the form of coloured boxes, this has now disappeared.....was this a different script?

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: Greasemonkey script to display team data on FPL league page

Post by MoSe »

"FPL get team info" still working for me on Chrome with Tampermonkey
it displays on opening of a league only if I right-click on it from my leagues summary (be it in My Team / Points / Leagues page) and use "Open link in another window / page"
if I instead directly left-click on it from any of the pages above it doesn't display on opening: I need to refresh for it to display (not a problem, fine with me)

"FPL get player info" doesn't work instead (in the List View of either Team / Points / Transfers), as FPL has changed the displayed columns adding a lot of their own
and if I refresh it goes back to Pitch View
 
andybarrell wrote: i had better fpl running as well, after disabling that it now works again, however i used to be able to see the next 5 fixtures difficulties on team page in the form of coloured boxes, this has now disappeared.....was this a different script?
the colored boxes are indeed displayed by Better FPL

t88
Treebeard
Posts: 261
Joined: 01 Dec 2010, 23:05

Re: Greasemonkey script to display team data on FPL league page

Post by t88 »

my script on Firefox had stopped working now. It only shows extra 2 columns with values: WC and chips. The rest all blank.
What version of the script is the latest? I'm on 2.1.1

User avatar
SuperGrover
Grumpy Old Man
Posts: 1540
Joined: 12 Sep 2012, 15:38
Location: Chicago, USA

Re: Greasemonkey script to display team data on FPL league page

Post by SuperGrover »

t88 wrote: 09 Sep 2017, 14:31 my script on Firefox had stopped working now. It only shows extra 2 columns with values: WC and chips. The rest all blank.
What version of the script is the latest? I'm on 2.1.1
Same. Was working up until Thursday maybe? On Chrome.

shinjiokazaki
Cheetah
Posts: 4
Joined: 20 Aug 2016, 17:13
FS Record: 11 years of play top 20k multiple times

Re: Greasemonkey script to display team data on FPL league page

Post by shinjiokazaki »

Can confirm. Also on the newest version of chrome and getting the blank columns for some reason.

User avatar
SuperGrover
Grumpy Old Man
Posts: 1540
Joined: 12 Sep 2012, 15:38
Location: Chicago, USA

Re: Greasemonkey script to display team data on FPL league page

Post by SuperGrover »

Guessing it is handling of chips as they were fired by a bunch of people this week.

zomri
Wideboy
Posts: 61
Joined: 21 Aug 2013, 23:37

Re: Greasemonkey script to display team data on FPL league page

Post by zomri »

its not chips.
they have changed their API handles in a way that fixing it should take some time.

User avatar
math!
Dumbledore
Posts: 6819
Joined: 01 Aug 2015, 03:30
FS Record: Yes

Re: Greasemonkey script to display team data on FPL league page

Post by math! »

Can also confirm the blank columns on firefox. I have it on auto-update so it is the latest version.

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

Re: Greasemonkey script to display team data on FPL league page

Post by kidzio »

Hi NickChild, both the website and the app are not working at the moment. I think you know already. Hope to see some fixes when you have the time. Thanks :)


Sent from my iPhone using Tapatalk

zomri
Wideboy
Posts: 61
Joined: 21 Aug 2013, 23:37

Re: Greasemonkey script to display team data on FPL league page

Post by zomri »

Have fixed it over the weekend for personal use. Testing tonight to see how it behaves live.
They have reshuffled the data a bit. The trickiest thing is they removed info about if player has played a game, bit of head scratching was needed but nothing too hard :)

User avatar
SuperGrover
Grumpy Old Man
Posts: 1540
Joined: 12 Sep 2012, 15:38
Location: Chicago, USA

Re: Greasemonkey script to display team data on FPL league page

Post by SuperGrover »

zomri wrote: 09 Sep 2017, 19:33 its not chips.
they have changed their API handles in a way that fixing it should take some time.
Interesting to introduce new handles mid-season. Wonder if they are adding something to the data?

Thanks for looking at it.

zomri
Wideboy
Posts: 61
Joined: 21 Aug 2013, 23:37

Re: Greasemonkey script to display team data on FPL league page

Post by zomri »

SuperGrover wrote: 12 Sep 2017, 04:56
zomri wrote: 09 Sep 2017, 19:33 its not chips.
they have changed their API handles in a way that fixing it should take some time.
Interesting to introduce new handles mid-season. Wonder if they are adding something to the data?

Thanks for looking at it.
think they just reorganized it for optimization purposes. might be wrong tho.

hellrokr
Cheetah
Posts: 7
Joined: 17 Sep 2017, 08:48

Re: Greasemonkey script to display team data on FPL league page

Post by hellrokr »

zomri wrote: 12 Sep 2017, 08:20
SuperGrover wrote: 12 Sep 2017, 04:56
zomri wrote: 09 Sep 2017, 19:33 its not chips.
they have changed their API handles in a way that fixing it should take some time.
Interesting to introduce new handles mid-season. Wonder if they are adding something to the data?

Thanks for looking at it.
think they just reorganized it for optimization purposes. might be wrong tho.
so how did it go?

shinjiokazaki
Cheetah
Posts: 4
Joined: 20 Aug 2016, 17:13
FS Record: 11 years of play top 20k multiple times

Re: Greasemonkey script to display team data on FPL league page

Post by shinjiokazaki »

zomri wrote: 11 Sep 2017, 10:53 Have fixed it over the weekend for personal use. Testing tonight to see how it behaves live.
They have reshuffled the data a bit. The trickiest thing is they removed info about if player has played a game, bit of head scratching was needed but nothing too hard :)
Any chance you could share please?

zomri
Wideboy
Posts: 61
Joined: 21 Aug 2013, 23:37

Re: Greasemonkey script to display team data on FPL league page

Post by zomri »

shinjiokazaki wrote: 18 Sep 2017, 12:17
zomri wrote: 11 Sep 2017, 10:53 Have fixed it over the weekend for personal use. Testing tonight to see how it behaves live.
They have reshuffled the data a bit. The trickiest thing is they removed info about if player has played a game, bit of head scratching was needed but nothing too hard :)
Any chance you could share please?
still some bugs and issues with some data but should be ok for now. if you see ludacris data just refresh and should show correct numbers. this is customized so it has some features that nicks script didn't like bonus points during matches, transfer data and points by players on mouseover.

all credit goes to nickchild of course

*edited link out*

been working on including bench points as well, will post when finished.
Last edited by zomri on 21 Sep 2017, 06:25, edited 1 time in total.

User avatar
nickchild
FISOhead
Posts: 648
Joined: 27 Jul 2006, 23:51
FS Record: 180th Overall FPL and X-League Winner 2008/09
Contact:

Re: Greasemonkey script to display team data on FPL league page

Post by nickchild »

Hi guys,

Apologies for the delay in looking at this... as correctly pointed out above, the API has changed

I have half fixed the app so you can see points and captains, but the played data now needs to be calculated from the players clubs KO time. Unless anyone has seen it more readily available?

I will update the script accordinly ASAP, hopefully this coming GW

zomri
Wideboy
Posts: 61
Joined: 21 Aug 2013, 23:37

Re: Greasemonkey script to display team data on FPL league page

Post by zomri »

Hi Nick,
As you can see in the script i posted, I have collected the playing data from "/live" data handle. you have to go through player data and then through fixtures which was a pain in the ass but got the job done.

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: Greasemonkey script to display team data on FPL league page

Post by MoSe »

that I learned too from the Side-game data project / FPL data collection ! :D
Mav3rick wrote: 19 Jul 2016, 18:46 Fixtures:
The fixture data is all contained here (online parsed version). You'll need to cross reference the team ids with the lookup data (which has the teams in it).

Gameweek Data:
The gameweek player data can be found at
https://fantasy.premierleague.com/drf/e ... mber>/live
(this is a set of data for all players in FPL)

Then for an individual FPL team, you can get their gameweek selection from
https://fantasy.premierleague.com/drf/e ... weekNumber>
(and cross check the player ids with the live player data if you want to find out individual gameweek data, such as goals scored).
e.g. by opening https://fantasy.premierleague.com/drf/event/5/live into http://www.jsoneditoronline.org
I get http://www.jsoneditoronline.org/?url=ht ... 2F5%2Flive
I don't code, so I hardly know what use I can do of it* :lol: but at least I understood where data are kept
Cech GW5.gif
player #2 is Chech

*actually, I even pasted a chunk of it into excel and managed to parse scoring items for first 75 players using excel formulas only :o 8-)

I see tho that now my team gameweek selection from https://fantasy.premierleague.com/drf/e ... 98/event/5 is empty! { } :?
Is that the data they've moved?
I figure Mav could update the Sidegame Data topic as well :mrgreen:

sorry for playing the n00b with what must be ABC (or do you say 1-2-3) for you, but it's a satisfaction managing to get a glimpse of what's going on behind the scenes ;)
You do not have the required permissions to view the files attached to this post.

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

Re: Greasemonkey script to display team data on FPL league page

Post by RomynPG »

Not quite sure what's what in this thread as I don't use the script myself so don't know what data it needs but wrt to latest api when I load

https://fantasy.premierleague.com/a/team/4288/event/5
which is my GW5 squad the following json files are now loaded

1. https://fantasy.premierleague.com/drf/e ... nt/5/picks
2. https://fantasy.premierleague.com/drf/event/5/live
3. https://fantasy.premierleague.com/drf/entry/4288

1. My picks for GW5
2. All GW5 fixtures and elements (players). (Fixtures has "started" & "finished" to reflect fixture state)
3. General squad info

Looking up data in 2 for the 15 players listed in 1 gives the data needed.

You all probably knew that already - but I'm not clear on what the problem is - apart from the api changing - is data missing?

zomri
Wideboy
Posts: 61
Joined: 21 Aug 2013, 23:37

Re: Greasemonkey script to display team data on FPL league page

Post by zomri »

RomynPG wrote: 20 Sep 2017, 16:57
You all probably knew that already - but I'm not clear on what the problem is - apart from the api changing - is data missing?
Yes, some data is missing or has changed place. Good news is that the missing data could be calculated.

shinjiokazaki
Cheetah
Posts: 4
Joined: 20 Aug 2016, 17:13
FS Record: 11 years of play top 20k multiple times

Re: Greasemonkey script to display team data on FPL league page

Post by shinjiokazaki »

nickchild wrote: 20 Sep 2017, 09:53 Hi guys,

Apologies for the delay in looking at this... as correctly pointed out above, the API has changed

I have half fixed the app so you can see points and captains, but the played data now needs to be calculated from the players clubs KO time. Unless anyone has seen it more readily available?

I will update the script accordinly ASAP, hopefully this coming GW
thanks dude. I love you for this script you're a genius and a magnanimous person.

zomri
Wideboy
Posts: 61
Joined: 21 Aug 2013, 23:37

Re: Greasemonkey script to display team data on FPL league page

Post by zomri »

just a tip for nick: having chicharito captain distorts a captain column because his "second_name" is too long. using "web_name" from the same API handle gives you the name we see everywhere else (chicharito, that is).

User avatar
nickchild
FISOhead
Posts: 648
Joined: 27 Jul 2006, 23:51
FS Record: 180th Overall FPL and X-League Winner 2008/09
Contact:

Re: Greasemonkey script to display team data on FPL league page

Post by nickchild »

Hi all,

Finally I have got around to updating the script! For those with automatic updates you shouldn't need to do anything, for everyone else run the update manually and all should be revealed.

I still haven't managed to figure out the page load inconsistensies, so you will probably need to perform a manual refresh once the league page has loaded.

Please keep an eye out for any errors/bugs as I have done limited testing/data checking and let me know if you find any issues.

---

I have changed the display names to use the web_name value instead of second_name as suggested by zomri.

I've also added rollovers showing the players scores on the XI and bench summary displayed via the 'T' toggle.

---

If anyone uses my iOS app, I updated my API over the weekend and should be correctly displaying played/didnt/to play stats.

Any other suggestions please let me know and I'll see what I can do.

Enjoy!

User avatar
SuperGrover
Grumpy Old Man
Posts: 1540
Joined: 12 Sep 2012, 15:38
Location: Chicago, USA

Re: Greasemonkey script to display team data on FPL league page

Post by SuperGrover »

Thanks for the update nick!

I am seeing an issue. Looks like the data from https://fantasy.premierleague.com/drf/e ... t/gw/picks is showing an incorrect value for entry_history.total_points. Specifically, it appears that the value of this field does not include points from Sunday's game. No idea why but it is obviously throwing off the Live score calculations. I should also note that the value from https://fantasy.premierleague.com/drf/e ... ID/history entry.summary_overall_points is correct and includes yesterday's game as well.

Might not be much you can do without refactoring where to get current points.

User avatar
FPLCasual
Kevin and Perry
Posts: 19
Joined: 21 Feb 2016, 01:37

Re: Greasemonkey script to display team data on FPL league page

Post by FPLCasual »

Working much better now.
Total points didn't include Monday's game or autosubs but live was correct.

zomri
Wideboy
Posts: 61
Joined: 21 Aug 2013, 23:37

Re: Greasemonkey script to display team data on FPL league page

Post by zomri »

Hi Nick,
Had a glance at your updated script. Just a couple of things i noticed:
- team value ("Value" column) shows total value which then messes up "Total value" column. think you should use values from https://fantasy.premierleague.com/drf/entry/+teamID handle
-while total transfers column shows exact number, next two columns (GWT and TPH) show last gw data. Same solution as above
-the free hit chip isn't addressed at all i think.
-number of semicolons are missing in the code.

Unfortunately i haven't tried your script live so don't really know what was the issue with live points. I also had a problem with inconsistent data but couldn't find where the bug is.

Features that I would like to see (some of which i have implemented for personal use) include:
-transfers in and out on mouse over gwt column
-switch to include live bonus points, automatic subs points and vice captain points in the case that captain didn't play
-draft leagues script.

User avatar
SuperGrover
Grumpy Old Man
Posts: 1540
Joined: 12 Sep 2012, 15:38
Location: Chicago, USA

Re: Greasemonkey script to display team data on FPL league page

Post by SuperGrover »

zomri wrote: 26 Sep 2017, 08:55 Hi Nick,
Had a glance at your updated script. Just a couple of things i noticed:
- team value ("Value" column) shows total value which then messes up "Total value" column. think you should use values from https://fantasy.premierleague.com/drf/entry/+teamID handle
-while total transfers column shows exact number, next two columns (GWT and TPH) show last gw data. Same solution as above
-the free hit chip isn't addressed at all i think.
-number of semicolons are missing in the code.

Unfortunately i haven't tried your script live so don't really know what was the issue with live points. I also had a problem with inconsistent data but couldn't find where the bug is.

Features that I would like to see (some of which i have implemented for personal use) include:
-transfers in and out on mouse over gwt column
-switch to include live bonus points, automatic subs points and vice captain points in the case that captain didn't play
-draft leagues script.
See my post above. The drf for game week picks is not updating correctly. So the source for that will need to be refactored or else the tool will be at the whim of updates to that page (which I think updates most days but maybe had a bug to exclude the Sunday games and autosubs until late Monday).

zomri
Wideboy
Posts: 61
Joined: 21 Aug 2013, 23:37

Re: Greasemonkey script to display team data on FPL league page

Post by zomri »

SuperGrover wrote: 28 Sep 2017, 19:31
zomri wrote: 26 Sep 2017, 08:55 Hi Nick,
Had a glance at your updated script. Just a couple of things i noticed:
- team value ("Value" column) shows total value which then messes up "Total value" column. think you should use values from https://fantasy.premierleague.com/drf/entry/+teamID handle
-while total transfers column shows exact number, next two columns (GWT and TPH) show last gw data. Same solution as above
-the free hit chip isn't addressed at all i think.
-number of semicolons are missing in the code.

Unfortunately i haven't tried your script live so don't really know what was the issue with live points. I also had a problem with inconsistent data but couldn't find where the bug is.

Features that I would like to see (some of which i have implemented for personal use) include:
-transfers in and out on mouse over gwt column
-switch to include live bonus points, automatic subs points and vice captain points in the case that captain didn't play
-draft leagues script.
See my post above. The drf for game week picks is not updating correctly. So the source for that will need to be refactored or else the tool will be at the whim of updates to that page (which I think updates most days but maybe had a bug to exclude the Sunday games and autosubs until late Monday).

That is the thing they changed. Now you have entry_history{} for past data and entry{} for live. You can get correct points, transfers and value data from https://fantasy.premierleague.com/drf/entry/teamID entry{} handle.

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

Re: Greasemonkey script to display team data on FPL league page

Post by RomynPG »

just dropping a link to the sidegame data project thread which, while I'm sure it's been linked before, is worth linking again as there's a fair amount of crossover (for those not familiar with it)

hellrokr
Cheetah
Posts: 7
Joined: 17 Sep 2017, 08:48

Re: Greasemonkey script to display team data on FPL league page

Post by hellrokr »

zomri wrote: 26 Sep 2017, 08:55 Hi Nick,
Had a glance at your updated script. Just a couple of things i noticed:
- team value ("Value" column) shows total value which then messes up "Total value" column. think you should use values from https://fantasy.premierleague.com/drf/entry/+teamID handle
-while total transfers column shows exact number, next two columns (GWT and TPH) show last gw data. Same solution as above
-the free hit chip isn't addressed at all i think.
-number of semicolons are missing in the code.

Unfortunately i haven't tried your script live so don't really know what was the issue with live points. I also had a problem with inconsistent data but couldn't find where the bug is.

Features that I would like to see (some of which i have implemented for personal use) include:
-transfers in and out on mouse over gwt column
-switch to include live bonus points, automatic subs points and vice captain points in the case that captain didn't play
-draft leagues script.
Can you share your version of script please?

View Latest: 1 Day View Your posts
Post Reply

Return to “Fantasy PremierLeague.com (FPL)”