如何使用 YQL 组合多个剩余查询?
例如,我想将多个查询剩余查询组合在一起。现在,我一次使用不同的 URL 执行以下代码。我认为在我的例子中最终提出 10 个链接的一个请求会更快。任何帮助表示赞赏。
use 'http://javarants.com/yql/javascript.xml'as j; select * from j where code='response.object = y.rest("http://feedproxy.google.com/~r/Techcrunch/~3/P%5FqWQXyAPU/").followRedirects(false).get().headers.location;'
For example I would like to combine multiple queries rest queries together. Right now I do the following code with different URLs one at a time. I think it would be faster to ultimately make one request for 10 links in my case. Any help is appreciated.
use 'http://javarants.com/yql/javascript.xml'as j; select * from j where code='response.object = y.rest("http://feedproxy.google.com/~r/Techcrunch/~3/P%5FqWQXyAPU/").followRedirects(false).get().headers.location;'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一种可能是为此构建您自己的 YQL 表,然后该表在
...
块中执行您需要的 javascript。我想到的另一个替代方案是
query.multi
YQL 表。不确定这是否符合您的要求,但您可以尝试一下。不要更改尾部引号 ("),它需要直接保留在最后一个分号之后(这是一个我刚刚挣扎了几分钟的错误)。
One possibility would be to build your own YQL table for this, which then executes the javascript you need in an
<execute>...</execute>
block.The other alternative that comes to mind is the
query.multi
YQL table.Not sure that does what you want it do to but you can give it a try. Don't change the trailing quotation mark ("), it needs to stay directly after the last semicolon (this was a mistake that I just struggled with for some minutes).