Feature: add get_watch_playlist, get_watch_playlist_shuffle

This commit is contained in:
sigma67 2020-07-24 14:25:13 +02:00
commit 3b46fda393
No known key found for this signature in database
GPG key ID: 1545A01D4474BAF0
8 changed files with 154 additions and 24 deletions

View file

@ -79,6 +79,24 @@ class TestYTMusic(unittest.TestCase):
song = youtube.get_song("ZrOKjDZOtkA")
self.assertGreaterEqual(len(song), 17)
###############
# WATCH
###############
def test_get_watch_playlist(self):
playlist = youtube.get_watch_playlist("4y33h81phKU", limit=50)
self.assertGreater(len(playlist), 50)
def test_get_watch_playlist_shuffle(self):
playlist = youtube.get_watch_playlist_shuffle(
playlistId="OLAK5uy_lKgoGvlrWhX0EIPavQUXxyPed8Cj38AWc")
self.assertEqual(len(playlist), 12)
def test_get_watch_playlist_shuffle_playlist(self):
playlist = youtube.get_watch_playlist_shuffle(
playlistId="PL528pVfw3ao0x8jlW3kwdIx1FEMMeeghb", limit=99)
self.assertGreaterEqual(len(playlist), 99)
###############
# LIBRARY
###############