March 09, 2004

Free UK TV Listings in XMLTV format have started offering free TV listings for the UK in XMLTV xml format, which is good news for users of various PVR and EPG programs such as TV Guide and Freeguide-TV etc, who up until recently got them from, luckily are now offering UK TV listings in XMLTV format, so my previous posting about using Coldfusion to download and reformat their html listings is no longer necessary, the only thing needed now is to download each channels listings then unzip them. I've written a Bourne shell script that does just this specifically for TV Guide. Heres the script

# filename:
# Get today's UK TV listings in XMLTV format
CHANNELS="bbc1 bbc2 itv1 ch4 five"

for ch in $CHANNELS
sleep 2
wget -U 'My TV Fetching application (' \
-O '' \
wzunzip -o
mv -f data.xml $ch.xml

The reason I wrote the script for the bourne shell, was there was a working example on the bleb mailing list using the bourne shell, and i was having problems getting a DOS batch file version to work, as whenever wget encountered an ampersand in one of WGet's URL parameters, it choked.

Theres more info on their TV listings at their website and also on their developers mailing list.

Posted by steeev to Cool Websites

at March 9, 2004 08:29 PM