It's really saying a lot that the official music streaming APIs are much more difficult than just invoking yt-dlp :akkounamused:
Follow

@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.

@m0xee no, i mean the officially provided APIs. Not the scraping that yt-dlp does.

@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.

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml