雅虎按纬度和经度查询天气

squ*_*art 10 yql yahoo-weather-api

我想使用雅虎查询通过纬度和经度获取一些天气数据.但似乎这个查询现在不可用.查询如下:

select * from weather.forecast where woeid in (SELECT woeid FROM geo.placefinder WHERE text="{lat},{lon}" and gflags="R")
Run Code Online (Sandbox Code Playgroud)

这个查询是改为新的还是什么?或者它不再存在?上次我使用这种格式是大约2个月前,它运作良好.但现在它无法获取任何数据.YQL控制台的结果如下:

{
 "error": {
  "lang": "en-US",
  "description": "Tenant 'query_yahooapis_com' access to 'Resource [tenantName=query_yahooapis_com, type=TABLE, name=geo.placefinder, locatorType=FILE, url=/home/y/share/manhattan/application/tenantBundles/yql_query_yahooapis_com_manhattan_v2/YQL-INF/restdefs/geo.placefinder.xml, useUrl=false]' is denied."
 }
}
Run Code Online (Sandbox Code Playgroud)

我已经做了一些研究,包括这篇文章:如何通过位置获得雅虎的祸害?

这是真的,雅虎已经终止这个纬度经度查询获取天气?

gre*_*reg 22

根据对此答案的最新回复,您应切换到表格geo.places并删除该gflags="R"部分.我在YQL控制台中尝试了它,它似乎工作:

select * from weather.forecast where woeid in (SELECT woeid FROM geo.places WHERE text="(latitude,longitude)")
Run Code Online (Sandbox Code Playgroud)

  • 尝试这个,是纽约:`select*from weather.forecast where woeid in(SELECT woeid FROM geo.places WHERE text ="(40.7141667,-74.0063889)")` (9认同)