[GH-ISSUE #430] Missing videoType and duration_seconds in unavailable tracks #320

Closed
opened 2026-02-27 23:00:10 +03:00 by kerem · 3 comments
Owner

Originally created by @MishchenkoYuriy on GitHub (Sep 15, 2023).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/430

ytmusicapi version: 1.2.1

Hi,

I was fetching tracks with YTMusic.get_playlist() and I found that all unavailable tracks ('isAvailable': False) have 'videoType': None and in some cases missing the duration_seconds. I can still access some of this data with YTMusic.get_song() (musicVideoType and durationSeconds fields).

get_playlist:

{'videoId': 'v4um7JFr-SY',
 'title': 'We Can Live Like Maddie and David',
 'artists': [{'name': 'Bebopovsky And The Orkestry Podyezdov', 'id': None}],
 'album': {'name': 'Pink Flamingo Detective Agency', 'id': None},
 'likeStatus': None,
 'thumbnails': [{'url': 'https://lh3.googleusercontent.com/h1hJEQnmaZ9zyRlEU8C0tsyo-HySjc2ADY6NrBXF6znA6O7R6afQt1XItJcrUKK0M_CUzn3UePqKWIR9qg=w60-h60-l90-rj',
   'width': 60,
   'height': 60},
  {'url': 'https://lh3.googleusercontent.com/h1hJEQnmaZ9zyRlEU8C0tsyo-HySjc2ADY6NrBXF6znA6O7R6afQt1XItJcrUKK0M_CUzn3UePqKWIR9qg=w120-h120-l90-rj',
   'width': 120,
   'height': 120}],
 'isAvailable': False,
 'isExplicit': False,
 'videoType': None,
 'setVideoId': 'D1BE74B44EB19F38'}

Is this behaviour intentional?

Originally created by @MishchenkoYuriy on GitHub (Sep 15, 2023). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/430 ytmusicapi version: 1.2.1 Hi, I was fetching tracks with YTMusic.get_playlist() and I found that all unavailable tracks (`'isAvailable': False`) have `'videoType': None` and in some cases missing the `duration_seconds`. I can still access some of this data with YTMusic.get_song() (`musicVideoType` and `durationSeconds` fields). get_playlist: ``` {'videoId': 'v4um7JFr-SY', 'title': 'We Can Live Like Maddie and David', 'artists': [{'name': 'Bebopovsky And The Orkestry Podyezdov', 'id': None}], 'album': {'name': 'Pink Flamingo Detective Agency', 'id': None}, 'likeStatus': None, 'thumbnails': [{'url': 'https://lh3.googleusercontent.com/h1hJEQnmaZ9zyRlEU8C0tsyo-HySjc2ADY6NrBXF6znA6O7R6afQt1XItJcrUKK0M_CUzn3UePqKWIR9qg=w60-h60-l90-rj', 'width': 60, 'height': 60}, {'url': 'https://lh3.googleusercontent.com/h1hJEQnmaZ9zyRlEU8C0tsyo-HySjc2ADY6NrBXF6znA6O7R6afQt1XItJcrUKK0M_CUzn3UePqKWIR9qg=w120-h120-l90-rj', 'width': 120, 'height': 120}], 'isAvailable': False, 'isExplicit': False, 'videoType': None, 'setVideoId': 'D1BE74B44EB19F38'} ``` Is this behaviour intentional?
kerem closed this issue 2026-02-27 23:00:10 +03:00
Author
Owner

@sigma67 commented on GitHub (Sep 15, 2023):

Which tracks? Please list search terms. IIRC this information is simply not provided on the website

<!-- gh-comment-id:1721552180 --> @sigma67 commented on GitHub (Sep 15, 2023): Which tracks? Please list search terms. IIRC this information is simply not provided on the website
Author
Owner

@MishchenkoYuriy commented on GitHub (Sep 15, 2023):

response = yt.get_playlist(playlist_id, limit=None)

The playlist_id of my private playlist won't help you. To replicate this problem you can take the videoId from my script above, add the track to a new playlist and get the playlist items with YTMusic.get_playlist(). Hope this helps.

<!-- gh-comment-id:1721580313 --> @MishchenkoYuriy commented on GitHub (Sep 15, 2023): ``` response = yt.get_playlist(playlist_id, limit=None) ``` The `playlist_id` of my private playlist won't help you. To replicate this problem you can take the `videoId` from my script above, add the track to a new playlist and get the playlist items with YTMusic.get_playlist(). Hope this helps.
Author
Owner

@sigma67 commented on GitHub (Sep 15, 2023):

So yes, as I mentioned above, YTMusic does not return this data. So there is no way for us to retrieve it.

Check out this playlist: https://music.youtube.com/playlist?list=PLQwVIlKxHM6pdInp9jDol7a2gK17FxEF2

If you hover, there is no Play button nor a duration. In the data the ID is also missing, else it would be parsed correctly.

<!-- gh-comment-id:1721843343 --> @sigma67 commented on GitHub (Sep 15, 2023): So yes, as I mentioned above, YTMusic does not return this data. So there is no way for us to retrieve it. Check out this playlist: https://music.youtube.com/playlist?list=PLQwVIlKxHM6pdInp9jDol7a2gK17FxEF2 If you hover, there is no Play button nor a duration. In the data the ID is also missing, else it would be parsed correctly.
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#320
No description provided.