Yahoo weather API,随机返回旧数据? [英] Yahoo weather API, randomly returns old data?
问题描述
我开始使用Yahoo的免费天气API来获取所需的天气数据,但是似乎每次我请求城市天气数据时,都有可能会获得1到8天的更新数据或旧数据.
I started using Yahoo's free weather API to get the weather data I need, but it seems each time I request a city weather data there is a chance that either I get updated data or old data from back to 1 to 8 days.
Here is a simple URL which I make my request with: Click here to see a sample request
YQL查询很简单,它请求纽约市的天气数据:
The YQL query is simple, which requests the weather data for New York city:
select * from weather.forecast where woeid in (select woeid from geo.places(1) where text="New York")
但是,每次刷新该URL时,我可能会得到完全不同的结果.例如,我现在确实做了几次刷新(现在是2015年11月13日,格林威治标准时间22:45),这是我在query.results.channel.item.condition.date
部分得到的一些结果:
But each time I refresh that URL, I might get a completely different result. for example I did refresh it right now a couple times (Now is 13th of November 2015, around 22:45 GMT time) and here are some results I got in the query.results.channel.item.condition.date
part:
"date":"Fri, 13 Nov 2015 4:49 pm EST"
"date":"Thu, 12 Nov 2015 2:13 am EST"
"date":"Wed, 11 Nov 2015 1:49 am EST"
"date":"Fri, 13 Nov 2015 1:49 am EST"
这是非常有线的,当我每次发出请求时API返回随机日期的天气数据时,我应该如何获取这样的当前天气数据?
This is very wired, how am I supposed to get current weather data like this when the API returns weather data for random dates each time I make a request?
我在做错什么或在这里错过了什么吗?
Am I doing something wrong or missing something here?
注释:
- 在我尝试过的许多不同城市中,这种行为都是相同的.
-
在YQL控制台中使用相同的查询似乎没有相同的问题. ( YQL控制台)(实际上也发现了相同的问题) - 此XML/RSS请求方法也发生了同样的事情: http://weather .yahooapis.com/forecastrss?w = 2459115
- This behavior is same for many different cities which I tried.
Using same query in YQL Console doesn't seem to be having same problem. (YQL Console)(Actually same problem has been spotted there too)- Same thing is also happening on this XML/RSS request method as well: http://weather.yahooapis.com/forecastrss?w=2459115
更新:
- 我确实遇到了一个案例,该案例从8天前就返回了我的数据!
- 使用YQL的SORT函数不能解决问题,因为排序是在选择请求的一个或多个记录之后应用的.
-
今天(2015年11月25日),我已经尝试了20多次刷新,并且似乎数据返回总是正确的,看来问题已解决.
-
2015年11月26日,雅虎宣布该问题已解决:感谢您的反馈.这个问题已被解决.请再次检查该站点.如果您仍然遇到此问题,请在此论坛上发布新想法.
- I did come across a case which returned me data from 8 days back!
- Using SORT functions of YQL doesn't fix the problem, since the sort is applied after selecting requested record/records.
Today (25th of November 2015), I have tried more than 20 refreshes and seems the data returning is always correct, it seems the problem is fixed.
On 26th of November 2015 Yahoo announced that the problem is fixed: Thanks for your feedback. This issue has been fixed. Please check out the site again. If you are still having this problem, please post a new idea on this forum.
推荐答案
Yahoo开发人员在Twitter上回复说,他们正在调查此问题.您可以在此处进行跟进和投票(以加快流程):
Yahoo dev's replied on twitter saying that they are investigating this issue. You can follow it up and upvote (for speeding the process) it here:
https://yahoo.uservoice.com/forums/207813/suggestions/10740099
这篇关于Yahoo weather API,随机返回旧数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!