You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an issue with the regex in the playlist mixin. It causes only the first group to be returned. For example if the playlist had 3647 songs it would return 3 due to how re.search(r"\d+", song_count_text) is used.
To Reproduce
Steps to reproduce the behavior:
Find a playlist with 1000+ songs
Use the YTMusic.get_playlist() function
Print the trackCount object.
It should return only the first digit
Additional context
fromytmusicapiimportYTMusic# Initialize YouTube Music APIytmusic=YTMusic()
PLAYLIST_ID="XXXXXX"# Call get_playlistplaylist=ytmusic.get_playlist(PLAYLIST_ID)
#Print trackCount to the consoleprint(playlist["trackCount"])
The text was updated successfully, but these errors were encountered:
Hello all,
This is an issue with the regex in the playlist mixin. It causes only the first group to be returned. For example if the playlist had
3647
songs it would return3
due to howre.search(r"\d+", song_count_text)
is used.To Reproduce
Steps to reproduce the behavior:
YTMusic.get_playlist()
functiontrackCount
object.Additional context
The text was updated successfully, but these errors were encountered: