Football Scores, In-Play Stats & Momentum via script, using an API. Code and example BAF
Unsure if this will amount to anything but a rework of the script now logs out all the available stats and momentum data every time a goal is scored. Unfortunately the historical API data doesnt capture goal times so forced to capture in real time.
A few weeks capturing though and might have aggregated data worth triggering an entry for...
A few weeks capturing though and might have aggregated data worth triggering an entry for...
You do not have the required permissions to view the files attached to this post.
-
- Posts: 165
- Joined: Thu May 09, 2013 5:57 pm
Absolutely brilliant job Stu. Collect that data and it will present you with worthy trades.sniffer66 wrote: ↑Wed Jan 12, 2022 3:50 pmUnsure if this will amount to anything but a rework of the script now logs out all the available stats and momentum data every time a goal is scored. Unfortunately the historical API data doesnt capture goal times so forced to capture in real time.
A few weeks capturing though and might have aggregated data worth triggering an entry for...
Capture.JPG
Interesting. Is this output from betangel (a new version of the rules file), or are you doing this directly in (a new version) of the script?
Anyhow, would be very interested in a copy
Once again this is great stuff!
Wondering if the inplay time is also possible to extract from the Sofascore API? In that case it would be very helpful, and solve the problem of having the correct inplay time after halftime. It is available right next to the momentum graph visually so probably accessible through the API as well?
Another nice addition would be red (and yellow) cards per team if available?
Is there a place you can find the available fields in the API? In that case I could check and change the script myself
Bear with me mate. As per your pm, I'm just crash testing the feedback loop from the csv output before I post it up. Can definitely do cards and times. Once I know it has no errors I'll put it up hereasaele wrote: ↑Thu Feb 03, 2022 10:18 amOnce again this is great stuff!
Wondering if the inplay time is also possible to extract from the Sofascore API? In that case it would be very helpful, and solve the problem of having the correct inplay time after halftime. It is available right next to the momentum graph visually so probably accessible through the API as well?
Another nice addition would be red (and yellow) cards per team if available?
Is there a place you can find the available fields in the API? In that case I could check and change the script myself
I tried this today. I trimmed out all the SV's except Set Current Home Score and Set Current Away Score and had them posting to the log every 60 seconds. Sadly, it only recognised one goal in one match all the other matches remained at Home Goals = 0 Away Goals = 0. In the match where it recognised the one goal it didn't recognise the subsequent goals.
When I look in the .csv file all the goals appear to be there but they weren't picked up by the .baf automation file.
When I look in the .csv file all the goals appear to be there but they weren't picked up by the .baf automation file.
- MemphisFlash
- Posts: 2152
- Joined: Fri May 16, 2014 10:12 pm
- Location: Leicester
works a treat.
You do not have the required permissions to view the files attached to this post.
- MemphisFlash
- Posts: 2152
- Joined: Fri May 16, 2014 10:12 pm
- Location: Leicester
You do not have the required permissions to view the files attached to this post.
- MemphisFlash
- Posts: 2152
- Joined: Fri May 16, 2014 10:12 pm
- Location: Leicester
You do not have the required permissions to view the files attached to this post.
How odd. I've done nothing to the code other than "Stats Off" and "Graphs Off" as per the original post. And because I'm only recording goals I have removed the rules that collect the other data from the example .baf file.
I'd be grateful if anyone has any ideas about what I might have done to mess it up.
I'd be grateful if anyone has any ideas about what I might have done to mess it up.
- MemphisFlash
- Posts: 2152
- Joined: Fri May 16, 2014 10:12 pm
- Location: Leicester
You do not have the required permissions to view the files attached to this post.
Can you post up the csv created by the script ? That will determine whether it's an issue with the script code or the baf.Frogmella wrote: ↑Mon Mar 07, 2022 9:43 amHow odd. I've done nothing to the code other than "Stats Off" and "Graphs Off" as per the original post. And because I'm only recording goals I have removed the rules that collect the other data from the example .baf file.
I'd be grateful if anyone has any ideas about what I might have done to mess it up.
Obviously from when there are matches on you have applied the baf to.
-
- Posts: 3216
- Joined: Thu Oct 24, 2019 8:25 am
- Location: Newport
Am I doing something wrong as all the team names are ** ?
You do not have the required permissions to view the files attached to this post.