I have made a lot of headway designing my own scraper, via VBA, to get in play stats from sofascore,
I am hitting a brick wall when trying to get minutes played, keep getting a N/A return - its doing my head in!!
does anybody possibly have a line of code that may help me in my quest?
Cheers
Taff
SofaScore API
Try using gpts deep research function. Explain very specifically the problem. You get ten tokens a month so make sure they are used wisely!Taff15 wrote: ↑Mon Mar 17, 2025 12:36 pmI have made a lot of headway designing my own scraper, via VBA, to get in play stats from sofascore,
I am hitting a brick wall when trying to get minutes played, keep getting a N/A return - its doing my head in!!
does anybody possibly have a line of code that may help me in my quest?
Cheers
Taff
- ShaunWhite
- Posts: 10354
- Joined: Sat Sep 03, 2016 3:42 am
Cheers for the pointer - Got there in the end, just an issue with Halftime reporting but loosing too much sleep already on this. so will come back to it. Thank heavens for AI - a positive use.
You do not have the required permissions to view the files attached to this post.
looks like it's still there (used to scrape it via this url years back but no longer do, so can't vouch for ip bans etc):
https://www.sofascore.com/api/v1/sport/ ... vents/live
- wearthefoxhat
- Posts: 3551
- Joined: Sun Feb 18, 2018 9:55 am
attached code I use for sofascore extraction.
It won't compile on its own as its just one module of my entire tool but feel free to rip what you want from it.
The unicode part of team names I never finished (have a correction table in DB it stores to that will return the BF name in query)
I wouldn't call the API constantly otherwise cloudflare might block you, I have a 30 second delay in place for each call
It won't compile on its own as its just one module of my entire tool but feel free to rip what you want from it.
The unicode part of team names I never finished (have a correction table in DB it stores to that will return the BF name in query)
I wouldn't call the API constantly otherwise cloudflare might block you, I have a 30 second delay in place for each call
You do not have the required permissions to view the files attached to this post.
Oi Taff, fair play for diving into VBA scraping – not for the faint-hearted!Taff15 wrote: ↑Mon Mar 17, 2025 12:36 pmI have made a lot of headway designing my own scraper, via VBA, to get in play stats from sofascore,
I am hitting a brick wall when trying to get minutes played, keep getting a N/A return - its doing my head in!!
does anybody possibly have a line of code that may help me in my quest?
Cheers
Taff
You might need to sniff out the API they use (check dev tools > network tab) – chances are the minutes are coming from there. Then you can grab it straight with VBA, no messing with the page itself.
If you're scraping from the HTML, maybe you're just missing the right element – chuck over your code line if you want, happy to have a quick look and help you out of the madness!