summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/Weather.hs
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2016-08-05 15:15:07 +0200
committerjao <jao@gnu.org>2016-08-05 15:15:07 +0200
commit69c40e8cebed65d1ea92c7ac9569fa15bb8a585c (patch)
tree8691d76762d0b164e71759f80027b1dd93e16798 /src/Plugins/Monitors/Weather.hs
parent6f52e4b8a68cd081dbac70dbd2db6003aafbaf74 (diff)
downloadxmobar-69c40e8cebed65d1ea92c7ac9569fa15bb8a585c.tar.gz
xmobar-69c40e8cebed65d1ea92c7ac9569fa15bb8a585c.tar.bz2
New weather stats URL (fixes #270)
Diffstat (limited to 'src/Plugins/Monitors/Weather.hs')
-rw-r--r--src/Plugins/Monitors/Weather.hs5
1 files 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