3

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;'
Xavier
  • 8,828
  • 13
  • 64
  • 98
  • See also **[Combining two queries in Yahoo YQL](http://stackoverflow.com/questions/3222803/combining-two-queries-in-yahoo-yql)** – hippietrail Dec 20 '11 at 21:18

1 Answers1

1

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).

USE 'http://javarants.com/yql/javascript.xml' AS j; 

SELECT * FROM query.multi WHERE queries="
select * from j where code='response.object = y.rest(\\'http://feedproxy.google.com/~r/Techcrunch/~3/P%5FqWQXyAPU/\\').followRedirects(false).get().headers';
select * from j where code='response.object = y.rest(\\'http://stackoverflow.com/feeds/question/4917144\\').followRedirects(false).get().headers';"
alex
  • 479,566
  • 201
  • 878
  • 984
spier
  • 2,642
  • 1
  • 19
  • 16