Hi, the script wasn't working anymore for me.
When I checked the API url
http://api.wunderground.com/api/xxxxxxx ... ssels.json
I got this as responce
Code: Select all
{
"response": {
"version":"0.1",
"termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
"features": {
"conditions": 1
}
, "results": [
{
"name": "Brussels",
"city": "Brussels",
"state": "BRU",
"country": "BX",
"country_iso3166":"BE",
"country_name":"Belgium",
"zmw": "00000.42.06447",
"l": "/q/zmw:00000.42.06447"
}
,
{
"name": "Brussels",
"city": "Brussels",
"state": "IL",
"country": "US",
"country_iso3166":"US",
"country_name":"Verenigde Staten",
"zmw": "62013.1.99999",
"l": "/q/zmw:62013.1.99999"
}
,
{
"name": "Brussels",
"city": "Brussels",
"state": "ON",
"country": "CA",
"country_iso3166":"CA",
"country_name":"",
"zmw": "00000.100.71261",
"l": "/q/zmw:00000.100.71261"
}
,
{
"name": "Brussel",
"city": "Brussel",
"state": "VLG",
"country": "BX",
"country_iso3166":"BE",
"country_name":"Belgium",
"zmw": "00000.1.06451",
"l": "/q/zmw:00000.1.06451"
}
,
{
"name": "Brussels",
"city": "Brussels",
"state": "WI",
"country": "US",
"country_iso3166":"US",
"country_name":"Verenigde Staten",
"zmw": "54204.1.99999",
"l": "/q/zmw:54204.1.99999"
}
]
}
}
Now i change manualy the url to
http://api.wunderground.com/api/xxxxxxx ... 06447.json
Now the response is back OK.
Code: Select all
{
"response": {
"version":"0.1",
"termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
"features": {
"conditions": 1
}
}
, "current_observation": {
"image": {
"url":"http://icons.wxug.com/graphics/wu2/logo_130x80.png",
"title":"Weather Underground",
"link":"http://www.wunderground.com"
},
"display_location": {
"full":"Brussels, Belgium",
"city":"Brussels",
"state":"BRU",
"state_name":"Belgium",
"country":"BX",
"country_iso3166":"BE",
"zip":"00000",
"magic":"42",
"wmo":"06447",
"latitude":"50.84999847",
"longitude":"4.34999990",
"elevation":"50.0"
},
"observation_location": {
"full":"Rue des Halles, Saint-Gilles, ",
"city":"Rue des Halles, Saint-Gilles",
"state":"",
"country":"BX",
"country_iso3166":"BE",
"latitude":"50.849998",
"longitude":"4.350000",
"elevation":"88 ft"
},
"estimated": {
},
"station_id":"ISAINTGI49",
"observation_time":"Last Updated on maart 18, 8:24 PM CET",
"observation_time_rfc822":"Sat, 18 Mar 2017 20:24:26 +0100",
"observation_epoch":"1489865066",
"local_time_rfc822":"Sat, 18 Mar 2017 20:33:03 +0100",
"local_epoch":"1489865583",
"local_tz_short":"CET",
"local_tz_long":"Europe/Brussels",
"local_tz_offset":"+0100",
"weather":"Geheel bewolkt",
"temperature_string":"52.7 F (11.5 C)",
"temp_f":52.7,
"temp_c":11.5,
"relative_humidity":"85%",
"wind_string":"From the WZW at 3.1 MPH Gusting to 12.4 MPH",
"wind_dir":"WZW",
"wind_degrees":258,
"wind_mph":3.1,
"wind_gust_mph":"12.4",
"wind_kph":5.0,
"wind_gust_kph":"20.0",
"pressure_mb":"1011",
"pressure_in":"29.86",
"pressure_trend":"0",
"dewpoint_string":"48 F (9 C)",
"dewpoint_f":48,
"dewpoint_c":9,
"heat_index_string":"NA",
"heat_index_f":"NA",
"heat_index_c":"NA",
"windchill_string":"NA",
"windchill_f":"NA",
"windchill_c":"NA",
"feelslike_string":"52.7 F (11.5 C)",
"feelslike_f":"52.7",
"feelslike_c":"11.5",
"visibility_mi":"6.2",
"visibility_km":"10.0",
"solarradiation":"--",
"UV":"0","precip_1hr_string":"-999.00 in ( 0 mm)",
"precip_1hr_in":"-999.00",
"precip_1hr_metric":" 0",
"precip_today_string":"0.09 in (2 mm)",
"precip_today_in":"0.09",
"precip_today_metric":"2",
"icon":"cloudy",
"icon_url":"http://icons.wxug.com/i/c/k/nt_cloudy.gif",
"forecast_url":"http://www.wunderground.com/global/stations/06447.html",
"history_url":"http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=ISAINTGI49",
"ob_url":"http://www.wunderground.com/cgi-bin/findweather/getForecast?query=50.849998,4.350000",
"nowcast":""
}
}