带有 gFlags 的 Yahoo YQL 查询不返回任何内容

Yahoo YQL query with gFlags returns nothing

本文关键字:返回 任何内 查询 YQL gFlags Yahoo 带有      更新时间:2023-09-26

当我尝试使用gFlags查询时,使用Yahoo YQL没有任何返回。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>

当我删除 gFlag 时,有一个成功的结果。例: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)

对我来说也一样,一个工作正常的查询现在返回 null。似乎从纬度/经度检索 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服务,然后调用天气服务。今天试过了,工作正常。

经过昨天的大量游戏,我发现geo.placefinder表什么也没返回,但geo.places表什么也不返回。因此,您可以将查询更改为"从 geo.places(1) 中选择 *,其中..."请注意,结果的格式略有不同。

另外,我注意到在传递纬度和经度时,请务必在其周围包含括号。 例如 text="(111.11111,222.22222)"

因此,要使用工作地点重新发布您的原始查询(请注意,不再有 GFlags 参数和纬度/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