Re:YouTube-dl has received a DMCA takedown from RIAA
by grishka on Friday October 23, 2020 @05:55PM
(#24874684)
In the case of youtube-dl, they couldn't do that. At least VEVO videos have an additional layer of "protection" — the direct links to video files require a signature of some sort IIRC. Downloading a non-DRM-ed video is as easy as making a request to https://www.youtube.com/get_video_info?video_id=aqz-KE-bpKQ and then following a link to the format you need, but with those music videos, that won't work. So the test cases were a necessity.
[ Parent
| on HN ]
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"]