News for hackers. Stuff that matters.
Re:YouTube-dl has received a DMCA takedown from RIAA by Kim_Bruning on Friday October 23, 2020 @07:06PM (#24875323)
Hmm, are you sure that link is correct? In firefox and chromium that gets me about 122K of not-very-easy-to-parse text.
Re:YouTube-dl has received a DMCA takedown from RIAA by grishka on Friday October 23, 2020 @08:21PM (#24875792)
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.
Re:YouTube-dl has received a DMCA takedown from RIAA by getcrunk on Friday October 23, 2020 @10:09PM (#24876339)
So what do I do next?
Re:YouTube-dl has received a DMCA takedown from RIAA by jewel on Friday October 23, 2020 @10:58PM (#24876601)
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"]