• yt-dlp can do it after you fiddle with the session cookies to authenticate your requests. There’s thorough documentation available on their github. I highly recommend you make a separate account for this; if you send too many malformed requests, you’ll be banned for botting.

      • Botting on youtube

        Too many requests in a short period will get you an error 429 and blacklisted from youtube. If you’re not banned, you’ll be rate-limited because they don’t want people using up their bandwidth - ironic considering their business model

        Alternatively, I’m pretty sure most Invidious instances will let you download any youtube video. You go to a website, search for the video, and click download. This is arguably easier if you’re not comfy on the command line