diff --git a/ytmusicapi/mixins/playlists.py b/ytmusicapi/mixins/playlists.py index 107b1d6..258f85a 100644 --- a/ytmusicapi/mixins/playlists.py +++ b/ytmusicapi/mixins/playlists.py @@ -149,9 +149,9 @@ def get_playlist( None if not has_duration else second_subtitle_runs[has_views + has_duration]["text"] ) song_count_text = second_subtitle_runs[has_views + 0]["text"] - song_count_search = re.search(r"\d+", song_count_text) + song_count_search = re.findall(r"\d+", song_count_text) # extract the digits from the text, return 0 if no match - song_count = to_int(song_count_search.group()) if song_count_search is not None else 0 + song_count = to_int("".join(song_count_search)) if song_count_search is not None else 0 else: song_count = len(section_list["contents"])