[mythtv-users] New Australian XMLTV grabber

Rob Hillis rob at hillis.dyndns.org
Sun Dec 12 10:27:29 UTC 2004

Paul Andreassen wrote:

> Could you try this version for daylight saving straddling. I believe 
> your version started about 15 hours early, due to Date::Manip getting 
> the timezone wrong. Why can't the perl people get there act together 
> and write some date routines that work with timezones?

After far too long, I've changed over to this posted version of the 
script - it's working fine for the freesd channels, but when I run an 
appropriately modified copy for Foxtel, I end up with the following...

    mythtv root # tv_grab_au_foxtel
    grabing 7 days into /var/local/tv_grab_au_foxtel/guide.xml
    starting 5 threads
    loading queue
    11122004 unchanged
    12122004 unchanged
    13122004 unchanged
    14122004 unchanged
    15122004 unchanged
    16122004 downloading
    Use of uninitialized value in string at /usr/bin/tv_grab_au_foxtel
    line 722.
    17122004 downloading
    Use of uninitialized value in string at /usr/bin/tv_grab_au_foxtel
    line 722.
    18122004 downloading
    Use of uninitialized value in string at /usr/bin/tv_grab_au_foxtel
    line 722.
    queue is complete
    all threads done
    building xml structure

At this point, the script just hangs.  Doesn't do anything, even if left 
alone for a few hours.  I probably should point out that the Foxtel 
channels aren't in my channels table (yet) though I doubt this is the 
cause of the problem.  A diff between the two scripts yeilds the 

mythtv bin # diff -u tv_grab_au tv_grab_au_foxtel
--- tv_grab_au  2004-12-12 18:58:37.059979392 +1100
+++ tv_grab_au_foxtel   2004-12-12 19:01:11.487502840 +1100
@@ -115,15 +115,15 @@
 #my $location = "Brisbane";
 #my $location = "Queensland";
 #my $location = "Sydney";
-my $location = "Melbourne";
-#my $location = "Australia";
+#my $location = "Melbourne";
+my $location = "Australia";

 # pick your source
 #my $source = "free";
-my $source = "freesd";
+#my $source = "freesd";
 #my $source = "freehd";
-#my $source = "foxtel";
+my $source = "foxtel";

 # choose the XMLID URL suffix that mythtv knows
@@ -144,7 +144,7 @@

 my $guide_url = "http://tvguide.ninemsn.com.au/guide/";
 my $details_url = "http://tvguide.ninemsn.com.au/closeup/default.asp?pid=";
-my $cache_dir = "/var/local/tv_grab_au";
+my $cache_dir = "/var/local/tv_grab_au_foxtel";

 my $XMLTV_prefix = $source . "." . $location . ".";
 my $XMLTV_suffix = "." . $XMLTVID_URL;

I haven't seen anything else that should need to be reconfigured.  Just 
in case there's an extra couple of linefeeds in my script, line 722 is 
the following one that is in bold.  It's in the last function of the script.

        if (open(PRN, ">", $guide_prn_file))
                for (my $count=0; $count<$#pidsrowspansnames; $count++) {
                        print PRN "$pidsrowspansnames[$count]>";
*                print PRN "$pidsrowspansnames[$#pidsrowspansnames]";
*                close(PRN);
        } else {
                print "can't open for writing $guide_prn_file\n";

I am as sure as I can be that I have copied the script verbatim.  My 
knowledge of PERL is near zero, though I know enough C/C++ to be able to 
make some sense of the code.  That line does look a little odd, though 
I'd be willing to bet the difference between $pids.. and $#pids is like 
the difference between a variable and a pointer, so I may well be wrong.

Is anyone else running in to this?  Is it just me?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20041212/aab05a70/attachment.htm

More information about the mythtv-users mailing list