I couldn't find any source code either. Cobalt also isn't really libre; their backend is AGPL, which is great, but their frontend is CC BY-NC-SA, which is not so great (and definitely not open-source).

I'd advise against downloading via someone else's servers anyway, as can be seen by their instance being blocked by Google. Hopefully some day someone manages to port yt-dlp to WASM, then it can be run locally in the browser without needing a download.

Fun fact: yt-dlp is public domain! That's really generous of them and I'm really thankful for their work.