[GH-ISSUE #297] YTMusic.subscribe_artists() does not subscribe, but only adds it to the subscriptions list #234

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

Originally created by @shuyec on GitHub (Sep 20, 2022).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/297

I'm trying to use YTMusic.subscribe_artists(["UC5OrDvL9DscpcAstz7JnQGA"]), but I've noticed that it only adds the artist to the subscriptions list. It shows up correctly with YTMusic.get_library_subscriptions, but the actual webpage looks like this:
Screenshot 2022-09-20 150208

It is in the list but not actually subscribed. You can also see this with YTMusic.get_artist because the "subscribed" key is false.

Originally created by @shuyec on GitHub (Sep 20, 2022). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/297 I'm trying to use `YTMusic.subscribe_artists(["UC5OrDvL9DscpcAstz7JnQGA"])`, but I've noticed that it only adds the artist to the subscriptions list. It shows up correctly with `YTMusic.get_library_subscriptions`, but the actual webpage looks like this: ![Screenshot 2022-09-20 150208](https://user-images.githubusercontent.com/76391491/191265526-32b8db08-08b6-4431-8b30-e93e5c0905d8.jpg) It is in the list but not actually subscribed. You can also see this with `YTMusic.get_artist` because the "subscribed" key is false.
kerem 2026-02-27 22:08:44 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@sigma67 commented on GitHub (Sep 21, 2022):

Not to discredit your observation, but this endpoint has been working and unchanged for a very long time. In my tests right now there were no issues.

Are you sure you're using the same account for all your tests? You might be subscribing with an unauthenticated account and checking subscriptions with a different instance. Your syntax also seems odd, as you're using the YTMusic class, not an instance. Alternatively, please provide more of your code.

<!-- gh-comment-id:1253384515 --> @sigma67 commented on GitHub (Sep 21, 2022): Not to discredit your observation, but this endpoint has been working and unchanged for a very long time. In my tests right now there were no issues. Are you sure you're using the same account for all your tests? You might be subscribing with an unauthenticated account and checking subscriptions with a different instance. Your syntax also seems odd, as you're using the `YTMusic` class, not an instance. Alternatively, please provide more of your code.
Author
Owner

@shuyec commented on GitHub (Sep 21, 2022):

I'm sorry, I found the mistake and it was my bad. I was actually subscribing using the browseId "UCoIOOL7QKuBhQHVKL8y7BEQ" from the search results and not the channelId "UC5OrDvL9DscpcAstz7JnQGA".
They are not interchangeable. If I subscribe with the browseId I can't unsubscribe with channelId

Subscribing using the browseId adds it to the subscriptions but does not subscribe.

ytmusic = YTMusic('headers_auth.json')
# ytmusic.subscribe_artists(["UCoIOOL7QKuBhQHVKL8y7BEQ"])     # BAD
ytmusic.subscribe_artists(["UC5OrDvL9DscpcAstz7JnQGA"])     # GOOD

Thanks for the reply.

<!-- gh-comment-id:1253478589 --> @shuyec commented on GitHub (Sep 21, 2022): I'm sorry, I found the mistake and it was my bad. I was actually subscribing using the `browseId` "UCoIOOL7QKuBhQHVKL8y7BEQ" from the search results and not the `channelId` "UC5OrDvL9DscpcAstz7JnQGA". They are not interchangeable. If I subscribe with the `browseId` I can't unsubscribe with `channelId` Subscribing using the `browseId` adds it to the subscriptions but does not subscribe. ``` python ytmusic = YTMusic('headers_auth.json') # ytmusic.subscribe_artists(["UCoIOOL7QKuBhQHVKL8y7BEQ"]) # BAD ytmusic.subscribe_artists(["UC5OrDvL9DscpcAstz7JnQGA"]) # GOOD ``` Thanks for the reply.
Author
Owner

@sigma67 commented on GitHub (Sep 21, 2022):

It's an interesting case because you can access the page with either ID under music.youtube.com/channel/ID. Where did you find the other channelId? I.e. the one not from the search results.

<!-- gh-comment-id:1253597815 --> @sigma67 commented on GitHub (Sep 21, 2022): It's an interesting case because you can access the page with either ID under `music.youtube.com/channel/ID`. Where did you find the other `channelId`? I.e. the one not from the search results.
Author
Owner

@shuyec commented on GitHub (Sep 21, 2022):

ytmusic.search(query="michael jackson", filter="artists")

This returns "UCoIOOL7QKuBhQHVKL8y7BEQ" as a browseId.

ytmusic.get_artist("UCoIOOL7QKuBhQHVKL8y7BEQ")
ytmusic.get_artist("UC5OrDvL9DscpcAstz7JnQGA")

Both of these two return the artist, but the first has some missing informations like shuffleId and radioId which are null.
If I use the website, it navigates me to "https://music.youtube.com/channel/UCoIOOL7QKuBhQHVKL8y7BEQ" so it uses the search browseId.

<!-- gh-comment-id:1253618838 --> @shuyec commented on GitHub (Sep 21, 2022): ``` python ytmusic.search(query="michael jackson", filter="artists") ``` This returns "UCoIOOL7QKuBhQHVKL8y7BEQ" as a browseId. ``` python ytmusic.get_artist("UCoIOOL7QKuBhQHVKL8y7BEQ") ytmusic.get_artist("UC5OrDvL9DscpcAstz7JnQGA") ``` Both of these two return the artist, but the first has some missing informations like `shuffleId` and `radioId` which are null. If I use the website, it navigates me to "https://music.youtube.com/channel/UCoIOOL7QKuBhQHVKL8y7BEQ" so it uses the search browseId.
Author
Owner

@sigma67 commented on GitHub (Sep 21, 2022):

Right, but where did you get this one? UC5OrDvL9DscpcAstz7JnQGA

<!-- gh-comment-id:1253623435 --> @sigma67 commented on GitHub (Sep 21, 2022): Right, but where did you get this one? `UC5OrDvL9DscpcAstz7JnQGA`
Author
Owner

@shuyec commented on GitHub (Sep 21, 2022):

ytmusic.get_artist("UCoIOOL7QKuBhQHVKL8y7BEQ")
ytmusic.get_artist("UC5OrDvL9DscpcAstz7JnQGA")

From here, they both have "UC5OrDvL9DscpcAstz7JnQGA" as channelId

<!-- gh-comment-id:1253629463 --> @shuyec commented on GitHub (Sep 21, 2022): ``` python ytmusic.get_artist("UCoIOOL7QKuBhQHVKL8y7BEQ") ytmusic.get_artist("UC5OrDvL9DscpcAstz7JnQGA") ``` From here, they both have "UC5OrDvL9DscpcAstz7JnQGA" as channelId
Author
Owner

@sigma67 commented on GitHub (Sep 21, 2022):

Ah, it seems each channel indeed has two IDs of the same format. Just a bit confusing that they are in the same format, despite being used for different purposes

<!-- gh-comment-id:1253848615 --> @sigma67 commented on GitHub (Sep 21, 2022): Ah, it seems each channel indeed has two IDs of the same format. Just a bit confusing that they are in the same format, despite being used for different purposes
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#234
No description provided.