The yt-dlp package provides a Python3 CLI utility to download audio and video files from thousands of websites, including YouTube. It can convert downloads into other formats using FFmpeg.
brotli (with Python3 bindings), certifi, Requests, and Urllib3
Install yt-dlp by running the following commands:
pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir $PWD
Now, as the root user:
pip3 install --no-index --find-links=dist --no-cache-dir --no-user yt_dlp