41 comments

[ 3.3 ms ] story [ 83.7 ms ] thread
I tried loading over HTTPS and got the following error:

    This server could not prove that it is
    worldcup.sfg.io; its security certificate
    is from *.herokuapp.com. This may be
    caused by a misconfiguration or an
    attacker intercepting your connection.
I have the same issue. Can't use inside my Preact component running on a https site.
I'll look into HTTPS, heroku says it is configured fine for worldcup.sfg.io, browser says it isn't, browser wins :)
Timezones look wrong. This is the stamp for today's match:

2018-06-14T17:00:00.000-05:00

Moscow is GMT+3, and kick-off is 18h local time (i.e. 15h GMT). Not sure what combination of stuff has gone wrong there!

Yes, the minutely update seems to be off by 2 hrs at least. The first match is already 3:0, but the API still has 0:0
Kinda unrelated but does anyone know where do Google get the win probability numbers from on the match pages? Is it something scientific or some "social" numbers (like which team is more popular, more searches etc.)
I suppose through some kind of machine learning, given the fact that they have a miriad of data of any kind.

It might look like a funny experiment/excercise for someone at Google.

You could very easily source it from betting markets.
This looks great! The background page says you were scraping the data from websites. Are you still doing that? If so:

- did you ask permission? Did you feel you had to?

- do you have problems with sites accidentally/deliberately breaking your parsing code?

Nice! I built a World Cup IRC bot back in 2014 but couldn't find a reliable API. In the end I found the only way I could get realtime results was by streaming from the official Twitter page, as they posted live match updates in a (reasonably) predictable format.

All the best with your API this World Cup!

Has anyone made a dashboard out of this? Would like to put something on our displays at the office but no time to do it myself!
You can try: pip install worldcup

And then: watch -n 60 worldcup today

And just make the font in the terminal window huge :)

At least on my server, I needed to run

    pip2 install worldcup       # didn't like Python3
    watch -cn 60 worldcup today # -c for colours
Also the time handling seems wrong - it claims Russia vs Saudia Arabia will be "9 hours from now" except it kicks off in 2.5 hours...
yup, all events and goals should happen in real time starting tomorrow, first day is always a mess because it is a scraper and FIFA is using a new CMS this year. Thought I had it worked, but had to make some sig changes to account for lots of JS.

Events and status changes and goals should all update in realtime now.

Is there no official API?
There are definitely other APIs for commercial use that don't rely on scraping but the problem is that they aren't free. Sports data can get very expensive.
http://worldcup.sfg.io/matches The time zone seems off. I get "datetime": "2018-06-14T17:00:00.000-05:00" for the first match.

It should however be 17:00 for CEST (UTC +2)

Time zones are always a pain, I'll check into it now that I got all the events working!
Slightly related: My friends have created https://wcfixtures.football. For some reason they only made it work on mobile. We did a similar one back in 2014 but I was not involved in this one. I imagine they use https://www.football-data.org or scape themselves.
Forgot to say thank you for this. I had a look at this yesterday and I love it. So clean. - pass on my thanks to your dev friends.
WhoScored and the StatsZone app are both wonderful to scrape if anybody wanted to poke around harder for more detailed data.
Nice, is there an end point to get the champion?
There are a quite a few problems with this. We are 31 minutes into the first game (Russia vs Saudi A) and it is 1 - nil.

This feed (although updated each minute) is not reflecting the score. Also the current game endpoint is empty.

As one poster has pointed out the timezone setting are wrong which could be why.

nope, was just problems with scraping data -- can't scrape data until it exists (FIFA is using a new CMS for World Cup 2018 that uses a fair amount of JS), and I couldn't get all the events that are used to mark a match officially completed.

Should be working now for the next games. First day is always a bit of a mess.

It's 'Colombia' not ,Columbia'
Hi all -- Sorry for not updating sooner -- FIFA changed things significantly from 2014 and I had to do a bunch of updating to the scraper to use headless chrome to pull in updates via JS to get all the events working again.

Everything should be working in real time for tomorrow's games. Real time goals, matches marked completed after they are officially over, and an event stream of goals, subs, and cards.

Sorry for delay, hard to scrape data until it actually exists, and besided the 50+ emails I got in the past few months asking me to make it work for 2018, I was the only one making PRs ;)

Should be good to go for tomorrow, please file a github issue if you see any problems.

Hey guys, I just created an API with my App for WhoScored. Its currently running very 15mins.

https://getdata.io/data-sources/5470-football-statistics-foo...

Will update again once I got another API setup for StatsZone when ready.

By the way, how often do you guys need data refresh for? Once I get some feedback I could tweak my app to increase the number of frequency.

Also please do ping me if you want to register your webhooks. My app only supports only one webhook per API at the moment. I will try to get it properly extended so that all your webhooks can get registered.

My email address is garyjob@getdata.io

I don't see any match related data from StatsZone at the moment, but I have created an API for the world cup related news articles that are being published on the site.

https://getdata.io/data-sources/5471-fifa-world-cup-fourfour...

I will check again to see if there are any new data once the match starts and then create an API for those too.