@newt
It sure is — because some has already put work into writing an extractor for yt-dlp so you can use it via a unified and streamlined interface 🤭
When you're using the API directly, doing that is up to you.
@newt
Yes, there is a universal extractor, that just picks whatever looks like an audio/video stream, but take a look in /usr/lib/python3.12/site-packages/yt_dlp/extractor/
In a lot of cases it doesn't even do the scraping and uses "official" APIs, but presents them as a class, so they have a unified interface — they are often poorly documented, but these are the same APIs that their respective "apps" use.