We have at least one more problem to deal with folks, and I'm afraid I
don't know how to fix it.

The line numbers in my script aren't the same as the latest updates, so
I'l refer to the code.

The forecast narrative/nowcast class ID on the page has changed to
"twc-col-1 twc-line-nar" (note... NO SPACE AT THE END).

If you change SDT to properly parse the tag (back to NOT having a space
at the end of the tag name):

@matches = $tree->look_down( "_tag", "td", "class", "twc-col-1
twc-line-nar" );


the following code dies:

if (scalar (@matches) > 0) { #Check if location supports nowcasts
$outcome_txt = $matches[1]->as_text;
if ($outcome_txt=~ m/Short-term forecast summary is only/) {
#Check if location supports nowcasts
$log->info('Non-US weather.com station selected');
}
else {
...

With $matches[1] being "undefined"...

I have no idea how to fix this -- I was unsuccessful in doing if(
defined ($matches[1]) ) { ... }

My "exceptional" perl skills are showing.  Are you sure we can't write
this in C??

ANYhow, if you have the parsing with "twc-col-1 twc-line-nar " --
that'll "work" because the problem will be avoided.  For now.

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

Reply via email to