<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Nick Tan wrote:
<blockquote
cite="mid43822.211.28.248.233.1122981970.squirrel@homebase.wehi.edu.au"
type="cite">
<blockquote type="cite">
<pre wrap="">Berry, David wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Same here (Canberra)
How do we fix it? - change the script?
</pre>
</blockquote>
<pre wrap="">I had a poke around and the changes seem to be they changed the url from
/closeup/ to /cu/ and changed a couple of the attributes that are
searched for the find the programs id to find its close up details. The
url changes are pretty simple and only exist in a couple of places
however I don't know anywhere enough, well no, perl to change the
regular expressions to filter out the right program info.
It seems it's either fixing this all the time or going back to d1 (I
only ever got program data for SBS News here in Canberra, never played
with it much) or paying $150 a year with IceTV.
</pre>
</blockquote>
<pre wrap=""><!---->
I think I've fixed it (it works with my setup anyways)
As you've said they've changed /closeup/ to /cu/ but they've also changed
how the pids are displayed.
Changes at around line 350 of the script:
if ($link =~ /cu\/default.asp/)
{
my $rowspan = $link;
$rowspan =~ s/.+rowspan=//g;
$rowspan =~ s/ .+//g;
my $name = $link;
#$name =~ s/.+target=new>(<P>|)//g;
$name =~ s/.+target=_new class=tv>//g;
$name =~ s/<\/a>.+//g;
if ($name =~ /\]/) {
my @nameline=split/\]/,$name;
$name = $nameline[1];
$name =~ s/^ //g;
}
my $linktemp = $link;
$link =~ s/.+pid=//g;
$link =~ s/".+//g; #"
my @linksplit=split/&/,$link;
#$link = $linksplit[0];
my @linksplit2=split/ /,$linksplit[0];
$link = $linksplit2[0];
chomp($link);
chomp($rowspan);
chomp($name);
also change the fetch_details subroutine to be:
sub fetch_details
{
my $datepid=$datepids->dequeue;
my @datepidl=split /-/, $datepid;
my $date = $datepidl[0];
my $pidtemp = $datepidl[1];
my @pidsplit=split /&/, $pidtemp;
my $pid = $pidsplit[0];
while (($date!=0) and ($pid!=0))
{
my $guide_dir = $cache_dir . "/" . $date;
mkpath ($guide_dir);
my $url = $details_url . $pid;
my $details_file = $guide_dir . "/" . $pid . ".html";
for (my $retry=0; is_error(getstore($url, $details_file))
&& ($retry<$retrys); $retry++)
{
sleep($seconds_before_retry);
}
$datepid=$datepids->dequeue;
@datepidl=split /-/, $datepid;
$date = $datepidl[0];
# $pid = $datepidl[1];
my $pidtemp = $datepidl[1];
my @pidsplit=split /&/, $pidtemp;
my $pid = $pidsplit[0];
}
}
Like I said, this works for me, YMMV. But it should be a good starting
point for anyone who wants to clean it up a bit :)
</pre>
</blockquote>
Change<br>
<pre wrap=""> my @linksplit=split/&/,$link;
#$link = $linksplit[0];
my @linksplit2=split/ /,$linksplit[0];
        $link = $linksplit2[0];</pre>
to<br>
<br>
<pre wrap=""> my @linksplit=split/&/,$link;
if ($#linksplit <= 0) {
                @linksplit=split/ /,$link;
        }
        if ($#linksplit > 0) {
                my @linksplit2=split/ / ,$linksplit[0];
                $link=$linksplit2[0];
        }
</pre>
Otherwise changed_guide will fail when running the script and it's
checking currently entered program info. It ends up with <pid>
onclick= instead of <pid>&x=<x> for some reason I'm
sure will be clear in the morning. Have fun :D<br>
</body>
</html>