[GH-ISSUE #282] Radio playlists are not dynamic #219

Closed
opened 2026-02-27 22:08:39 +03:00 by kerem · 6 comments
Owner

Originally created by @MarvinSchenkel on GitHub (Jul 17, 2022).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/282

When calling the get_watch_playlist with a videoId and/or playlistId, I expect the result to be dynamic and change with every call, just like on YT Music whenever I start a radio based on a playlist for example.

I do include the RDAMPL in addition to my playlist ID, for example get_watch_playlist(playlistId="RDAMPLOLAK5uy_l_fKDQGOUsk8kbWsm9s86n4-nZNd2JR8Q").

Am I missing something, or is this expected behaviour? I would love to get some dynamic content :-)

Originally created by @MarvinSchenkel on GitHub (Jul 17, 2022). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/282 When calling the `get_watch_playlist` with a videoId and/or playlistId, I expect the result to be dynamic and change with every call, just like on YT Music whenever I start a radio based on a playlist for example. I do include the `RDAMPL` in addition to my playlist ID, for example `get_watch_playlist(playlistId="RDAMPLOLAK5uy_l_fKDQGOUsk8kbWsm9s86n4-nZNd2JR8Q")`. Am I missing something, or is this expected behaviour? I would love to get some dynamic content :-)
kerem 2026-02-27 22:08:39 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@sigma67 commented on GitHub (Jul 18, 2022):

It should in fact change with every call. I just verified with the radio playlist link you provided.

Are you sure the result is the same on every call for you?

<!-- gh-comment-id:1187006180 --> @sigma67 commented on GitHub (Jul 18, 2022): It should in fact change with every call. I just verified with the radio playlist link you provided. Are you sure the result is the same on every call for you?
Author
Owner

@MarvinSchenkel commented on GitHub (Jul 18, 2022):

Alright, so the story gets even weirder. It seems to return 1 extra item after each subsequent call to the initial list of tracks. So for example, call 1:
image

Call 2:
image
Note the length of the list and the head of the list being exactly the same songs.

This is the exact code I am using to get the lists mentioned above:

ytmapi = ytmusicapi.YTMusic(auth="_my_amazing_cookie")
tracks = ytmapi.get_watch_playlist(playlistId="RDAMPLOLAK5uy_l_fKDQGOUsk8kbWsm9s86n4-nZNd2JR8Q")

I feel like I am missing something very obvious here, hope you can point me in the right direction 👍

<!-- gh-comment-id:1188298524 --> @MarvinSchenkel commented on GitHub (Jul 18, 2022): Alright, so the story gets even weirder. It seems to return 1 extra item after each subsequent call to the initial list of tracks. So for example, call 1: <img width="715" alt="image" src="https://user-images.githubusercontent.com/17671719/179614736-2ac09af0-f23b-41fe-8025-3aac9e7ec23d.png"> Call 2: <img width="727" alt="image" src="https://user-images.githubusercontent.com/17671719/179614852-bfb8c34f-6b6a-4d55-9968-7397f56e5211.png"> Note the length of the list and the head of the list being exactly the same songs. This is the exact code I am using to get the lists mentioned above: ```python ytmapi = ytmusicapi.YTMusic(auth="_my_amazing_cookie") tracks = ytmapi.get_watch_playlist(playlistId="RDAMPLOLAK5uy_l_fKDQGOUsk8kbWsm9s86n4-nZNd2JR8Q") ``` I feel like I am missing something very obvious here, hope you can point me in the right direction 👍
Author
Owner

@MarvinSchenkel commented on GitHub (Jul 26, 2022):

Same thing seems to be happening with individual songs as well, for example:
ytmapi.get_watch_playlist(videoId="oB4JhCwF8S8") keeps returning the same tracks as well. Also tried the ytmapi.get_watch_playlist_shuffle function, but that one throws an error:

Exception has occurred: KeyError
'content'

EDIT: This seems to happen when I call these methods in quick succession. Just for fun I tried the same call I posted last week, which now comes back with a different list than the one I posted.

Could this be caching on the google side?

<!-- gh-comment-id:1195823723 --> @MarvinSchenkel commented on GitHub (Jul 26, 2022): Same thing seems to be happening with individual songs as well, for example: `ytmapi.get_watch_playlist(videoId="oB4JhCwF8S8")` keeps returning the same tracks as well. Also tried the `ytmapi.get_watch_playlist_shuffle` function, but that one throws an error: ``` Exception has occurred: KeyError 'content' ``` EDIT: This seems to happen when I call these methods in quick succession. Just for fun I tried the same call I posted last week, which now comes back with a different list than the one I posted. Could this be caching on the google side?
Author
Owner

@sigma67 commented on GitHub (Aug 2, 2022):

Thanks for being persistent, I now believe that this is indeed due to a difference in the requests sent by ytmusicapi vs the web app.

The key tunerSettingValue had been missing up to now, with it the results are consistently dynamic for me.

Can you test with latest master and report back?

<!-- gh-comment-id:1202772066 --> @sigma67 commented on GitHub (Aug 2, 2022): Thanks for being persistent, I now believe that this is indeed due to a difference in the requests sent by ytmusicapi vs the web app. The key `tunerSettingValue` had been missing up to now, with it the results are consistently dynamic for me. Can you test with latest master and report back?
Author
Owner

@MarvinSchenkel commented on GitHub (Aug 5, 2022):

Tested the new version, but unfortunately I still get the same results as before. So the list does change when I wait long enough, but when I run the code after 1min, the list is still the same as before.

<!-- gh-comment-id:1206660819 --> @MarvinSchenkel commented on GitHub (Aug 5, 2022): Tested the new version, but unfortunately I still get the same results as before. So the list *does* change when I wait long enough, but when I run the code after 1min, the list is still the same as before.
Author
Owner

@sigma67 commented on GitHub (Oct 1, 2022):

Well, I finally figured it out. Turns out setting params to wAEB is needed to properly randomize the result (i.e. get a radio playlist). I restructured get_watch_playlist a bit to fix this.

<!-- gh-comment-id:1264366428 --> @sigma67 commented on GitHub (Oct 1, 2022): Well, I finally figured it out. Turns out setting `params` to `wAEB` is needed to properly randomize the result (i.e. get a radio playlist). I restructured `get_watch_playlist` a bit to fix this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#219
No description provided.