带有 gFlags returns 的 Yahoo YQL 查询无

Yahoo YQL query with gFlags returns nothing

当我尝试不使用 gFlags 进行查询时使用 Yahoo YQL returns。 https://developer.yahoo.com/yql/console/?debug=true#h=select+*+from+geo.placefinder+where+text%3D%2237.416275%2C-122.025092%22+and+gflags%3D'R'

回复:

<?xml version="1.0" encoding="UTF-8"?>
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng"
    yahoo:count="0" yahoo:created="2016-01-20T16:07:28Z" yahoo:lang="en-US">
    <diagnostics>
        <publiclyCallable>true</publiclyCallable>
        <url execution-start-time="16" execution-stop-time="21"
            execution-time="5" http-status-code="503" http-status-message="Service Unavailable"><![CDATA[http://gws2.maps.yahoo.com/findlocation?pf=1&locale=en_US&offset=15&flags=&q=37.416275%2c-122.025092&gflags=R&start=0&count=100]]></url>
        <user-time>22</user-time>
        <service-time>5</service-time>
        <build-version>0.2.376</build-version>
    </diagnostics> 
    <results/>
</query>

当我删除 gFlags 时,结果是成功的。例子: https://developer.yahoo.com/yql/console/?debug=true#h=select+*+from+geo.placefinder+where+text%3D%2237.416275%2C-122.025092%22

我需要使用 gFlags 访问 woeid 属性(来自 POI,根据文档:https://developer.yahoo.com/boss/geo/docs/free_YQL.html

我也一样,现在可以正常工作的查询 returns 空。似乎从纬度/经度检索 woeid 的内部调用在雅虎服务器内部没有成功。但是,此调用在我的机器上运行良好:

http://gws2.maps.yahoo.com/findlocation?pf=1&locale=en_US&offset=15&flags=&q=48.136757%2c-1.622015&gflags=R&start=0&count=100

因此,解决方法是先调用 findLocation 服务,然后使用 woeid 调用天气服务。今天试了一下,效果很好。

昨天玩了很多,发现geo.placefindertablereturns没有,geo.placestable有。因此,您可以将查询更改为 "select * from geo.places(1) where..." 请注意,结果的格式略有不同。

此外,我注意到在传递纬度和经度时,一定要在其两边加上括号。例如。 text="(111.11111,222.22222)"

因此,要重新发布包含工作地点的原始查询(注意没有更多 GFlags 参数和 lat/lng 两边的括号):

https://developer.yahoo.com/yql/console/?debug=true#h=select+*+from+geo.places(1)+where+text%3D%22(37.416275%2C-122.025092)%22