This is cool. I wish I could do this sort of thing, however when I come up again something like this I assume it's already been done and go look for the solution. In this case I'd likely have just used yt-dlp. However, had that project been dmca'd, by disreputable organisatios I'd likely have remained stuck, so kudos.