Back to discussionComment by grishka[-]grishka6 years ago1 reply#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.[-]getcrunk6 years ago1 reply#So what do I do next?jewel6 years ago#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"]
grishka6 years ago1 reply#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.
jewel6 years ago#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"]