Alexandre François Garreau <galex-...@galex-713.eu> wrote: > Please correct me right away if I’m wrong (just posting that right away upon > reading) —I’d be happy to be— but currently there’s no free-software youtube > downloader as youtube makes them need to execute autogenerated non-free > javascript to get essential information to download them, isn’t it?
No, youtube.com does not really conceal direct links to the video. On the contrary, is provides them in machine-readable way. As a proof of concept, try this piece of mess in context of a page:
fetch('/get_video_info?&format=json&video_id=' + new URLSearchParams(location.search).get('v')) .then(resp => resp.text()) .then(text => open(JSON.parse(new URLSearchParams(text) .get('player_response')) .streamingData.formats .filter(i => i.mimeType.startsWith('video/webm')) // find max height video .reduce((acc, elt) => acc.height > elt.height ? acc : elt) .url));
I do not know, how youtube-dl works, though.
signature.asc
Description: PGP signature