Correct NOAA WX weather product URL regression

One piecemeal use of the retired weather.noaa.gov/pub URL was missed
in the correlate() function, causing it to be reintroduced for
zone-based reports (such as forecasts) in a subsequent correlation
dataset update. Correct the invalid URLs in the zones file, and
update the correlation routine to embed the correct and working
tgftp.nws.noaa.gov hostname instead.
This commit is contained in:
Jeremy Stanley
2016-11-07 15:54:17 +00:00
parent aafdd48e1b
commit 96808c892f
2 changed files with 72583 additions and 72582 deletions

View File

@@ -1531,12 +1531,13 @@ def correlate():
zones[zone]["description"] = description
for line in data[1:]:
line = line.decode("latin1").strip()
urimatch = re.match("/webdocs/(.+):(.+) for ", line)
urimatch = re.match("/webdocs/pub/(.+):(.+) for ",
line)
if urimatch:
uritype = urimatch.group(2).lower().replace(" ","_")
zones[zone][uritype] \
= "http://weather.noaa.gov/%s" \
% urimatch.group(1)
zones[zone][uritype] = (
"http://tgftp.nws.noaa.gov/%s"
% urimatch.group(1))
count += 1
zcatalog.close()
print("done (%s files)." % count)

145156
zones

File diff suppressed because it is too large Load Diff