Skip to content

Instantly share code, notes, and snippets.

@nekman
Created September 3, 2014 22:12
Show Gist options
  • Save nekman/275b5ed9394ac2625f80 to your computer and use it in GitHub Desktop.
Save nekman/275b5ed9394ac2625f80 to your computer and use it in GitHub Desktop.
function toYQL(url) {
var yqlUrl = 'http://query.yahooapis.com/v1/public/yql?q=',
query = 'select * from json where url="{url}"'.replace('{url}', url);
return yqlUrl + encodeURIComponent(query) + '&format=json';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment