Skip to content

Instantly share code, notes, and snippets.

@tbeseda
Created September 21, 2010 02:02
Show Gist options
  • Select an option

  • Save tbeseda/589058 to your computer and use it in GitHub Desktop.

Select an option

Save tbeseda/589058 to your computer and use it in GitHub Desktop.
var player = 'your gamertag';
$.getJSON("http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22http%3A%2F%2Fwww.bungie.net%2FStats%2FReach%2FCareerStats%2Fdefault.aspx%3Fplayer%3D"+player+"%22%20and%20xpath%3D'%2F%2Fspan%5B%40id%3D%22ctl00_mainContent_kdLabel%22%5D'&format=json&diagnostics=true&callback=?", function(data){
var kdr = data.query.results.span.content;
alert('My Halo Reach Kill/Death ration is:' + kdr);
});
@tbeseda
Copy link
Author

tbeseda commented Sep 21, 2010

Until Bungie releases their official API, I just use YQL and jQuery to scrape my K/D ratio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment