Next month: March 2013
Basically, I store the country winners as a string like "E012345" where each numeric digit indicates the number of jackpot winners in a fixed country order (e.g. 0 = no French winners, 1 = one Spanish winner etc.). What I'd failed to do is decode that string and the number of UK winners (stored in another area of the draw data file line) to calculate the total number of European winners and preload into a shell array variable.
Hence, any display of jackpot winners would be incorrect if any data came back after the number of European winners was known (which happens most draw nights) and "no jackpot winners" would be wrongly displayed. I now decode the string properly and a re-run of tonight's scraping showed that the newsflash would have been generated correctly with the fixed code.
I also asked if there was a date set for the main Lotto Autumn changes yet and when the new Rules and Procedures booklet would be out. I suspect I put so much in the e-mail that they'll probably ignore it :-)
I have also added a special case for the Thunderball when there are no Match 5 winners. Camelot wrongly claim that the unwon 5-match prize is £0 in that case when of course it should be £5,000. I now automatically correct this if it's detected once the full Thunderball results are in. Yes, it actually happened with draw #1397 last Wednesday and I was showing £0 for the 5-match prize until today. I'm hoping this is the last issue with the main Lotto, Thunderball and HotPicks draws - they should hopefully run smoothly through to the Autumn now when there's a massive change to the main Lotto of course.
I have a suspicion that I may be jumping the gun a bit when declaring no Euro Millions jackpot winners using data from the Irish official site (which although it displays the jackpot prize pool quite fast, it isn't always the fastest with the prize tier info). To debug this, I'm now logging the updated lines in my data file after any update and also saving the scraped HTML from whichever official sites caused each data file update. This will allow me to study things a little more closely on Tuesday night, assuming there are no jackpot winners again.
A reminder that there's still a couple of outstanding issues with the automatic updating of the pages for Euro Millions draw. Firstly, I still haven't written "proper" code to parse the official Irish site's number of winners in each country. It should just be a case of going through their history of results pages and seeing how they phrase the different combinations of country winners. It does also remind me that I really should have a table of country winners somewhere on the site! Update: I've added that table now.
The second issue is one of the long time gap between announcing the number of Euro Millions jackpot winners (only in a newsflash) and the next update, which is the full results (including UK figures). When I was updating the site manually, I would use the previous draw's currency conversion figure to generate an appropriate sterling value for the jackpot and then use that for the UK jackpot figure. I'd have to adjust things if there was more than one jackpot winner and I'd also keep an eye on the Irish official site for the winning countries and I'd mention those too. I could also display the Europe-wide number of winners in each tier at this point, which was handy.
I don't do any of this now until the full UK results come out and until I fix the parsing of the winning countries from the Irish site, I probably won't attempt anything to do this automatically. This effectively means that I am entirely dependent on the time the UK official site updates with its full results to put up any of the full results info (e.g. the number of winners in each tier across Europe and the jackpot prize in Euros is known up to an hour before the UK update).
Even as I type this at 10.25pm, the Irish site still has nothing up at all about tonight's draw, not even the winning numbers! Annoyingly, it's also one of the few sites that quotes an unwon jackpot figure (and, in fact, the only one I scrape that does do). Hence, the final bits of my page updates - for the unown jackpot prize in Euros and the calculated currency conversion rate - couldn't be done. I eventually lost patience, updated my data file manually and re-generated the pages with the last bits of pending data.
This meant that although the LP5 pages would be re-generated, they ran the risk of not using the fresh data line for the latest LP5 draw (i.e. they'd use an older C header file for the results). This appeared to happen tonight, so I cleaned the build and did it from scratch, which properly updated the pages. I've now added the right dependency in the Makefile, so this shouldn't happen again. It may have happened on non-other-draw days in the past too i.e. on Mondays, Thursdays or Sundays, because on draw days, the header file would have been updated by the main Lotto, Thunderball, HotPicks or Euro Millions draws (which would have dragged in any LP5 data file changes).
Previous month: January 2013