From 9e5cea431693076e6e46c6f7805893e2190381b5 Mon Sep 17 00:00:00 2001 From: waynieack Date: Sat, 22 Oct 2016 11:34:27 -0500 Subject: [PATCH] Fix for some local offices not issuing an RWR, I now check for the message and try the state for issuedby=. --- lib/site/Geo/WeatherNOAA.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/site/Geo/WeatherNOAA.pm b/lib/site/Geo/WeatherNOAA.pm index 4b74570ab..57d29170f 100644 --- a/lib/site/Geo/WeatherNOAA.pm +++ b/lib/site/Geo/WeatherNOAA.pm @@ -503,6 +503,17 @@ sub get_city_hourly { #print STDERR "Getting data from $URL\n"; my $data = get_data( $URL, $filename, $fileopt, $UA ); my $datalength = length($data); + if ( $data =~ /None issued/ ) { + $URL = + $URL_BASE + . $zone + . '&issuedby=' + . $state + . '&product=RWR&format=txt&version=1&glossary=0'; + + $data = get_data( $URL, $filename, $fileopt, $UA ); + $datalength = length($data); + } #print STDERR "Got data ($datalength)\n";