From 69c40e8cebed65d1ea92c7ac9569fa15bb8a585c Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 5 Aug 2016 15:15:07 +0200 Subject: New weather stats URL (fixes #270) --- src/Plugins/Monitors/Weather.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Plugins/Monitors/Weather.hs b/src/Plugins/Monitors/Weather.hs index a25005f..cd1b4eb 100644 --- a/src/Plugins/Monitors/Weather.hs +++ b/src/Plugins/Monitors/Weather.hs @@ -183,7 +183,8 @@ parseData = return [WI st ss y m d h w v sk tC tF dC dF rh p] defUrl :: String -defUrl = "http://weather.noaa.gov/pub/data/observations/metar/decoded/" +-- "http://weather.noaa.gov/pub/data/observations/metar/decoded/" +defUrl = "http://tgftp.nws.noaa.gov/data/observations/metar/decoded/" stationUrl :: String -> String stationUrl station = defUrl ++ station ++ ".TXT" @@ -191,7 +192,7 @@ stationUrl station = defUrl ++ station ++ ".TXT" getData :: String -> IO String #ifdef HTTP_CONDUIT getData station = CE.catch (do - manager <- newManager tlsManagerSettings + manager <- newManager tlsManagerSettings request <- parseUrl $ stationUrl station res <- httpLbs request manager return $ B.unpack $ responseBody res -- cgit v1.2.3