Well, it's back to working without error this morning.
Weird. But I guess that's just the world of web page scraping. Sigh.
Looking at the script, and with all due respect (I am sooo not a Perl
programmer), I see lots of parsing code like the following:
#Next36 'B' TOD header
@matches = $tree->look_down( "_tag", "td", "class", "twc-col-3
twc-forecast-when" );
$outcome_txt = $matches[ 0 ]->as_text;
if ($outcome_txt =~ m/(.*)/) {
$wetData{1}{'forecastTOD'} = uc($1);
}
else {
$status = '-';
$log->warn('Error parsing next 24 -B- TOD header');
}
Should all these calls to look_down not be followed by a check to see
if the sought tag was returned, before dereferencing the value with
as_text? If this check were included, would it not at least allow the
script to continue running as opposed to stop running?
I'm just asking... While I'm a petty experienced programmer, I don't
write any Perl.
Peter
--
PeterGV
------------------------------------------------------------------------
PeterGV's Profile: http://forums.slimdevices.com/member.php?userid=31531
View this thread: http://forums.slimdevices.com/showthread.php?t=14327
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins