Mjolinor
05-13-2002, 11:34 AM
Having sorted the makeup of slice files I am now trying to get the listings via the web.
I tried looking at some of the Perl scripts that are available and found them to be hard to read. This is mostly because they have fancy loops in order to get multiple channels for multiple days.
Attached here are two Perl scripts that I wrote just to demonstrate the first parts needed to get data for slice files.
"myperl" gets the raw HTML from the site listed in the script (you can change this to any URL), this happens to be BBC1 for "tomorrow"
"myperl2" opens the raw html file and removes everything from it but the time, programme name and programme description. The way it is filtered off will differ from URL to URL. I just looked at the HTML and decided how to do it so if the URL is changed and the data format is different then the filtering will need re-doing.
For example it happens that at teletext.co.uk each of the wanted data lines has 4 TABS at the beginning so this is what I searched for and kept all the lines that matched.
I run this on Suse Linux 7.1 but needed to get the simple addons for Perl (no idea what they are but they allow the http access).
I have no idea how to run this on windose but I believe that Perl is available.
Does anyone know if there is a Perl interpreter for use on the TiVo itself so that this can be done directly from the TiVo?
I tried looking at some of the Perl scripts that are available and found them to be hard to read. This is mostly because they have fancy loops in order to get multiple channels for multiple days.
Attached here are two Perl scripts that I wrote just to demonstrate the first parts needed to get data for slice files.
"myperl" gets the raw HTML from the site listed in the script (you can change this to any URL), this happens to be BBC1 for "tomorrow"
"myperl2" opens the raw html file and removes everything from it but the time, programme name and programme description. The way it is filtered off will differ from URL to URL. I just looked at the HTML and decided how to do it so if the URL is changed and the data format is different then the filtering will need re-doing.
For example it happens that at teletext.co.uk each of the wanted data lines has 4 TABS at the beginning so this is what I searched for and kept all the lines that matched.
I run this on Suse Linux 7.1 but needed to get the simple addons for Perl (no idea what they are but they allow the http access).
I have no idea how to run this on windose but I believe that Perl is available.
Does anyone know if there is a Perl interpreter for use on the TiVo itself so that this can be done directly from the TiVo?