simon04/gnome-shell-extension-weather — pull request #66 by sandnon (2012-03-06 06:21:01+00:00)
Title: A modify changed the request url and the way to analyse the response data.

Hi,
I may find something wrong, but I'm not sure. Because I nearly can not find any information in the website....
When I used the extension first time, it works well. And I like it. But when I finished my holiday and back to school, I found it can not work anymore.
I'm in China. So you know, I thought the reason is the GFW block the Yahoo!'s weather service. BTW, I can browse Yahoo!'s weather website. So I was confused and folk the code.
Then I noticed that the URL you used to request the data is(as my test configuration):

http://query.yahooapis.com/v1/public/yql?format=json&q=select link,location,wind,atmosphere,units,item.condition,item.forecast from weather.forecast where location="2459114" and u="c";

I tried this URL in my chromium, and it responsed some data:

{"query":{"count":0,"created":"2012-03-06T06:07:53Z","lang":"en-US","results":null}}

You see, the results is null.
Then I find that YQL's example uses "woeid" rather than "location".
so I correct URL to

http://query.yahooapis.com/v1/public/yql?format=json&q=select link,location,wind,atmosphere,units,item.condition,item.forecast from weather.forecast where woeid="2459114" and u="c";

This URL is just change your URL's "location" to "woeid". And it returns useful data.
I don't know why. Maybe Yahoo! changed its API. I'm not sure.
But I'm sure that the code works well in my computer.

Hope you can accept the code. ^_^