Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, it's correct and it should return that. The top-level serialization format is simply a URL query string aka application/x-www-form-urlencoded. No idea why but probably historical reasons.


So what do I do next?


In ruby:

  require 'cgi'
  require 'json'
  require 'net/http'
  res = Net::HTTP.get URI 'https://www.youtube.com/get_video_info?video_id=aqz-KE-bpKQ'
  vars = CGI.parse res
  json = JSON.parse vars["player_response"].first
  pp json["streamingData"]["formats"]




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: