wonkypenguin wrote: ↑23 Jul 2022, 20:53
So I got some stupid idea in my head to write some FPL data extraction tools as part of learning some new (to me) languages/tech, and I came across this page (no idea how I've missed it before!). Was gonna have a peruse at what people have done, but I see a lot of the older links seem to be out of action nowadays... is anyone in here still actively maintaining any source in Python/Ruby/anything other interesting languages?
TIA!
I maintain a basic Python script that collects information for an FPL league using the FPL API. It creates a gameweek report for each member in the league (first page only, though can be adapted). I could PM you a copy to play with. I'm not a pro Python programmer so it is probably not
pythonic but worked perfectly well for the past few years for my purposes as the admin of a league.
Example of my manager summary report from GW38 last year:
Code: Select all
Manager Summary
Entry ID: 841311
Manager: [name removed]
Team: Just an illusion
Rank: 1
Points: 2369
Gameweek Stats
Total Points: 76
Transfers: 2
Transfer Cost: 4
Bench Points: 18
Auto-sub Points: 0
Gameweek Rank: 527289
Active Chip: -
Captain: Son
Vice Captain: Vardy
Gameweek Transfers
In: Vardy Out: Richarlison Nett: 10
In: Toney Out: Watkins Nett: -4
Current Stats
Pts GS GA CS OG PS PM YC RC BN CP VP
76 6 2 3 0 0 0 2 0 7 12 10
I also have an end-of-season script that summarises all the members performances, again using the API
Code: Select all
Player: [name removed]
Team Name: Just an illusion
Rank: 1
Points: 2369
GW Started: 1
High Score: 102 in game week 37
Low Score: 20 in game week 2
Transfer Stats:
Total: 55, Hits: 19, Cost: 88
Captain Stats:
Pts: 643 from 37 active, High: 57 in game week 37
Vice-Captain Stats:
Pts: 4 from 1 active, High: 4 in game week 25
Auto-sub Stats:
Pts: 94 from 28 active, High: 11 in game week 10
Bonus Point Stats:
Pts: 297, Captain Extra: 46, Bench: 25
Starting Selection Stats:
YC: 47, RC: 1, GS: 103, GA: 85, PM: 1, CS: 134
Bench Selection Stats:
YC: 9, RC: 0, GS: 9, GA: 2, PM: 0, CS: 11
By Position: GKP DEF MID FWD
Goals 0 10 64 29
Assists 0 18 46 21
Clean Sheets 10 60 64 29
Bonus Points 16 73 131 77
Total Points 148 664 1142 503
Above average gameweek scores: 30