Football Scores, In-Play Stats & Momentum via script, using an API. Code and example BAF

asaele
Posts: 22
Joined: Fri Jul 02, 2021 8:45 am

Great. Thanks a lot!
sniffer66
Posts: 1679
Joined: Thu May 02, 2019 8:37 am

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


Capture.JPG
You do not have the required permissions to view the files attached to this post.
footysystems
Posts: 165
Joined: Thu May 09, 2013 5:57 pm

sniffer66 wrote:
Wed Jan 12, 2022 3:50 pm
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...



Capture.JPG
Absolutely brilliant job Stu. Collect that data and it will present you with worthy trades.
asaele
Posts: 22
Joined: Fri Jul 02, 2021 8:45 am

sniffer66 wrote:
Wed Jan 12, 2022 3:50 pm
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.
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 :D
asaele
Posts: 22
Joined: Fri Jul 02, 2021 8:45 am

sniffer66 wrote:
Wed Dec 29, 2021 7:48 am
Hopefully I've covered everything off, but shout if you have any questions or suggestions.
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
sniffer66
Posts: 1679
Joined: Thu May 02, 2019 8:37 am

asaele wrote:
Thu Feb 03, 2022 10:18 am
sniffer66 wrote:
Wed Dec 29, 2021 7:48 am
Hopefully I've covered everything off, but shout if you have any questions or suggestions.
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 here :)
asaele
Posts: 22
Joined: Fri Jul 02, 2021 8:45 am

:D
User avatar
Frogmella
Posts: 220
Joined: Mon May 30, 2011 2:44 pm
Location: Towcester

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.
User avatar
MemphisFlash
Posts: 2152
Joined: Fri May 16, 2014 10:12 pm
Location: Leicester

Capture.JPG

works a treat. :D :D :D
You do not have the required permissions to view the files attached to this post.
User avatar
MemphisFlash
Posts: 2152
Joined: Fri May 16, 2014 10:12 pm
Location: Leicester

Capture.JPG
You do not have the required permissions to view the files attached to this post.
User avatar
MemphisFlash
Posts: 2152
Joined: Fri May 16, 2014 10:12 pm
Location: Leicester

Capture.JPG
You do not have the required permissions to view the files attached to this post.
User avatar
Frogmella
Posts: 220
Joined: Mon May 30, 2011 2:44 pm
Location: Towcester

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.
User avatar
MemphisFlash
Posts: 2152
Joined: Fri May 16, 2014 10:12 pm
Location: Leicester

forest.JPG
You do not have the required permissions to view the files attached to this post.
sniffer66
Posts: 1679
Joined: Thu May 02, 2019 8:37 am

Frogmella wrote:
Mon Mar 07, 2022 9:43 am
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.
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.
Obviously from when there are matches on you have applied the baf to.
Archery1969
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.
Post Reply

Return to “Bet Angel Automation - Football”