summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-08-24 21:58:00 +0300
committermonsta <[email protected]>2016-08-24 21:58:00 +0300
commit835055e0d0b950d3f66ad236de7e40942f6f7d8e (patch)
treed86d58234a2002cbe51f3deb34fd28ff68138627
parent120bf8df6c6f063ab51f96349cf97c6d848f5841 (diff)
downloadlibmateweather-835055e0d0b950d3f66ad236de7e40942f6f7d8e.tar.bz2
libmateweather-835055e0d0b950d3f66ad236de7e40942f6f7d8e.tar.xz
metar: switch to aviationweather.gov (weather.noaa.gov is discontinued)
-rw-r--r--libmateweather/weather-metar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libmateweather/weather-metar.c b/libmateweather/weather-metar.c
index da71db5..0787546 100644
--- a/libmateweather/weather-metar.c
+++ b/libmateweather/weather-metar.c
@@ -522,7 +522,7 @@ metar_finish (SoupSession *session, SoupMessage *msg, gpointer data)
metar = g_strdup (p);
success = metar_parse (metar, info);
g_free (metar);
- } else if (!strstr (msg->response_body->data, "National Weather Service")) {
+ } else if (!strstr (msg->response_body->data, "AVIATION WEATHER CENTER")) {
/* The response doesn't even seem to have come from NWS...
* most likely it is a wifi hotspot login page. Call that a
* network error.
@@ -550,8 +550,8 @@ metar_start_open (WeatherInfo *info)
}
msg = soup_form_request_new (
- "GET", "http://weather.noaa.gov/mgetmetar.php",
- "cccc", loc->code,
+ "GET", "http://aviationweather.gov/metar/data",
+ "ids", loc->code,
NULL);
soup_session_queue_message (info->session, msg, metar_finish, info);