Skip to content
Discussion options

You must be logged in to vote

Turns out this can be done pretty easily by looking at the api code. Basically we fetch the 1rst radio page from ytmusic, using the get_watch_playlist code. What we do differently though, is that we also recuperate a continuation token.

Then we reuse that token and that original request body to recuperate the next page in that radio, in a separate method. This allows us to infinitely fetch a single next page at a time instead of fetching 50 pages (which takes a long time) in one go. This does simulate youtube music's radio better imo.

from ytmusicapi.exceptions import YTMusicServerError
from ytmusicapi.parsers.playlists import validate_playlist_id
from ytmusicapi.parsers.watch import (
    

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by orrnithogalum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant