Closed jnbt closed 8 years ago
thanks! Can you also update the zip so I can just merge this in?
@felixhageloh Thanks for your feedback. I've updated the ZIP archive.
great thanks!
Do you know anything about this by any chance https://github.com/felixhageloh/weather-widget/issues/29#issuecomment-199315090? Did the API maybe change again (apparently this change was working for a while and then stopped working again)?
Something strange is happening here. For me the current state (from my PR) is still working.
What kind of response are you getting? Simple opening the URL in the browser should be sufficient.
I have the feeling that YQL isn't the best maintained product. If problems continue to appear one could also think about switching the provider, e.g. OpenWeatherMap (http://openweathermap.org/forecast5)
I think you are right about that :D ... well it is free. This is what I get from visiting the url you provided (prettified the json):
{
"query": {
"count": 1,
"created": "2016-03-22T14:48:25Z",
"lang": "en-us",
"results": {
"channel": {
"title": "Yahoo! Weather - Bochum, DE",
"link": "http://us.rd.yahoo.com/dailynews/rss/weather/Bochum__DE/*http://weather.yahoo.com/forecast/GMXX3998_c.html",
"description": "Yahoo! Weather for Bochum, DE",
"language": "en-us",
"lastBuildDate": "Tue, 22 Mar 2016 2:59 pm CET",
"ttl": "60",
"location": {
"city": "Bochum",
"country": "Germany",
"region": "NW"
},
"units": {
"distance": "km",
"pressure": "mb",
"speed": "km/h",
"temperature": "C"
},
"wind": {
"chill": "7",
"direction": "300",
"speed": "11.27"
},
"atmosphere": {
"humidity": "73",
"pressure": "1013.6",
"rising": "2",
"visibility": ""
},
"astronomy": {
"sunrise": "6:29 am",
"sunset": "6:49 pm"
},
"image": {
"title": "Yahoo! Weather",
"width": "142",
"height": "18",
"link": "http://weather.yahoo.com",
"url": "http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif"
},
"item": {
"title": "Conditions for Bochum, DE at 2:59 pm CET",
"lat": "51.49",
"long": "7.21",
"link": "http://us.rd.yahoo.com/dailynews/rss/weather/Bochum__DE/*http://weather.yahoo.com/forecast/GMXX3998_c.html",
"pubDate": "Tue, 22 Mar 2016 2:59 pm CET",
"condition": {
"code": "26",
"date": "Tue, 22 Mar 2016 2:59 pm CET",
"temp": "9",
"text": "Cloudy"
},
"description": "\n<img src=\"http://l.yimg.com/a/i/us/we/52/26.gif\"/><br />\n<b>Current Conditions:</b><br />\nCloudy, 9 C<BR />\n<BR /><b>Forecast:</b><BR />\nTue - Cloudy. High: 11 Low: 6<br />\nWed - AM Showers. High: 9 Low: 1<br />\nThu - Mostly Cloudy. High: 11 Low: 6<br />\nFri - Light Rain. High: 9 Low: 6<br />\nSat - Partly Cloudy. High: 15 Low: 8<br />\n<br />\n<a href=\"http://us.rd.yahoo.com/dailynews/rss/weather/Bochum__DE/*http://weather.yahoo.com/forecast/GMXX3998_c.html\">Full Forecast at Yahoo! Weather</a><BR/><BR/>\n(provided by <a href=\"http://www.weather.com\" >The Weather Channel</a>)<br/>\n",
"forecast": [
{
"code": "26",
"date": "22 Mar 2016",
"day": "Tue",
"high": "11",
"low": "6",
"text": "Cloudy"
},
{
"code": "39",
"date": "23 Mar 2016",
"day": "Wed",
"high": "9",
"low": "1",
"text": "AM Showers"
},
{
"code": "28",
"date": "24 Mar 2016",
"day": "Thu",
"high": "11",
"low": "6",
"text": "Mostly Cloudy"
},
{
"code": "11",
"date": "25 Mar 2016",
"day": "Fri",
"high": "9",
"low": "6",
"text": "Light Rain"
},
{
"code": "30",
"date": "26 Mar 2016",
"day": "Sat",
"high": "15",
"low": "8",
"text": "Partly Cloudy"
}
],
"guid": {
"isPermaLink": "false",
"content": "GMXX3998_2016_03_26_7_00_CET"
}
}
}
}
}
}
This is the strange part about it. Either the users in #29 are using the old version or the API behaves in a non-deterministic way.
does it maybe depend on your region? I.E. they haven't rolled out the same api for all their regions/data centers?
Maybe, I'm calling the API from Germany which is working.
nur ne Idee was schiefgehen könnte :) - danke für Deine Hilfe übrigens!
:laughing:
Otherwise Yahoo returns the error "No definition found for Table weather.bylocation".
The updated
get-weather
follows the basic examples at: https://developer.yahoo.com/weather/#examplesBasically I substituted:
with: