diff --git a/tests/test.py b/tests/test.py index 94f8207..866fb65 100644 --- a/tests/test.py +++ b/tests/test.py @@ -115,7 +115,7 @@ class TestYTMusic(unittest.TestCase): ############### def test_get_foreign_playlist(self): - playlist = youtube.get_playlist("PLQwVIlKxHM6qv-o99iX9R85og7IzF9YS_", 300) + playlist = youtube.get_playlist("PL6bPxvf5dW5clc3y9wAoslzqUrmkZ5c-u", 300) self.assertGreater(len(playlist['tracks']), 200) def test_get_owned_playlist(self): diff --git a/ytmusicapi/ytmusic.py b/ytmusicapi/ytmusic.py index f1caf6c..fed6e0c 100644 --- a/ytmusicapi/ytmusic.py +++ b/ytmusicapi/ytmusic.py @@ -754,7 +754,8 @@ class YTMusic: playlist['year'] = nav(header, SUBTITLE3) if len(header['secondSubtitle']['runs']) > 1: - song_count = int(header['secondSubtitle']['runs'][0]['text'].split(' ')[0]) + song_count = \ + int(header['secondSubtitle']['runs'][0]['text'].split(' ')[0].replace(',', '')) playlist['duration'] = header['secondSubtitle']['runs'][2]['text'] else: playlist['duration'] = header['secondSubtitle']['runs'][0]['text']