X-Git-Url: https://www.yuggoth.org/gitweb?p=weather.git;a=blobdiff_plain;f=weather.py;h=b5b71a11aa74fb31eb66e81cf61c4a6e77a9668a;hp=7d07e9134520b975270f3a1d4423683e1f3b9b8b;hb=915f1b8d7d104e8fec75018bb470051f96f5abee;hpb=a33dd24ec1503c62f10587709e9b9a260972626b diff --git a/weather.py b/weather.py index 7d07e91..b5b71a1 100644 --- a/weather.py +++ b/weather.py @@ -6,7 +6,7 @@ weather_copyright = """\ # provided in the LICENSE file distributed with this software. #""" -weather_version = "2.1" +weather_version = "2.3" radian_to_km = 6372.795484 radian_to_mi = 3959.871528 @@ -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)