使用gFlags的Yahoo YQL查询不返回任何内容(Yahoo YQL query with gFlags returns nothing)

编程入门 行业动态 更新时间:2024-10-27 18:33:39
使用gFlags的Yahoo YQL查询不返回任何内容(Yahoo YQL query with gFlags returns nothing)

当我尝试使用gFlags查询时使用Yahoo YQL没有返回。 https://developer.yahoo.com/yql/console/?debug=true#h=select+ * + from + geo.placefinder +其中+ text%3D%2237.416275%2C-122.025092%22 +和+ 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 +其中+ text%3D%2237.416275%2C-122.025092%22

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

Using Yahoo YQL when I try to query using gFlags nothing 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'

Response:

<?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>

When I remove gFlags, there's a succesfull result. Example: https://developer.yahoo.com/yql/console/?debug=true#h=select+*+from+geo.placefinder+where+text%3D%2237.416275%2C-122.025092%22

I need to use gFlags to access the woeid attribute (from the POI, according to the docs: https://developer.yahoo.com/boss/geo/docs/free_YQL.html)

最满意答案

在昨天玩了很多次之后,我发现geo.placefinder表什么都没有返回,但geo.places表却没有。 因此,您可以将查询更改为“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

After much playing yesterday, I discovered that the geo.placefinder table returns nothing, but the geo.places table does. So you can change your query to "select * from geo.places(1) where..." Just be aware that the results are formatted slightly differently.

Also, I noticed that when passing in latitude and longitude, be sure to include parentheses around it. E.g. text="(111.11111,222.22222)"

So, to repost your original query with the working places (notice there is no more GFlags parameter and the parentheses around the 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

更多推荐

本文发布于:2023-08-01 02:11:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1351458.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:内容   Yahoo   gFlags   YQL   returns

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!