function test(vid){ function parse_qs(s){var rc={}; s.split("&").forEach(function(p){var a=p.split("=");rc[decodeURIComponent(a[0])]=decodeURIComponent(a[1]||"");}); return rc;} var xhr = new XMLHttpRequest(); xhr.open("GET", "http://www.youtube.com/get_video_info?eurl=http://www.youtube.com/&video_id=" + vid); xhr.onload = function(){console.dir(parse_qs(this.responseText).url_encoded_fmt_stream_map.split(",").map(parse_qs));}; xhr.send(); } test("yzE-r0zj09o");