To fill out a little:
The fetching process looked like it worked, it appeared to be fetching data OK, following redirects etc. and it loaded into tvheadend. But the programmes themselves were hopelessly jumbled.
Capturing the XML output from the grabber and looking at it, the data is wrong there. The programmes I'm expecting to see are present, but they're assigned to all the wrong channels, apparently at random (ie: programmes for one channel are not being reliably reassigned to a single other channel, but all over the place. I'm not sure I'm reading the timestamps right either. The first part of the programme start value is clearly a date, but the timestamp part after that is a bit more opaque. Either that or just wrong. (it doesn't seem to be seconds into the day for instance, the values are still wrong.) eg: A programme I knew to be starting at 20:00 today (May 21), with a 5-minutes-before start time configured, has a programme start time of "20220526185500 +0000" The first part's a date, what's the second part? Could do with some ISO8601 love here I reckon! And anyway it's set to completely the wrong channel. (Supposed to be BBC Four HD, is Children's ITV (UK btw)) The other programmes I wanted were supposed to be on the same channel but the data I got back put them on Al Jazeera and CBBC HD respectively...
I suspect your code is fine and Schedules Direct's back-end upgrade has gone horribly wrong...
I then went through a bunch of adventures trying to fix things, I believe hampered by the actual DVB-S2 receiver needing a reset, so all my recordings today were missed... I'm pretty much on the edge of giving up on the whole business, as there's not much I even use it for these days (those missed programmes? got 'em already, they would just be fresher versions) Currently it's trying again to do an epg ota fetch and a uk-tvguide fetch, not tbh with a lot of success so far (there being reasons why I'd ended up with Schedules Direct already).