Constructor
class PlaylistManager()
Manages a list of Playlist Video objects with functionality to access, and iterate over the list.
Does not containDeletedVideo objects.
Example
Get videos count
import MyTube
link = "https://www.youtube.com/playlist?list=PLBnetXbvs5BGzGIsoxe6MYhX1hB7iRoOD"
p = MyTube.Playlist(link)
print(len(p.videos))
Slice
import MyTube
link = "https://www.youtube.com/playlist?list=PLBnetXbvs5BGzGIsoxe6MYhX1hB7iRoOD"
p = MyTube.Playlist(link)
for video in p.videos[:3]:
print(video.title)
print(video.streams)
YouTube Rewind 2010: Year in Review
StreamsManager(29 streams)
[pause]
[pause]
YouTube Rewind 2011
StreamsManager(24 streams)
[pause]
[pause]
Rewind YouTube Style 2012
StreamsManager(24 streams)
Index
import MyTube
link = "https://www.youtube.com/playlist?list=PLBnetXbvs5BGzGIsoxe6MYhX1hB7iRoOD"
p = MyTube.Playlist(link)
yt = p.videos[0]
print(yt.title)
print(yt.streams)
yt = p.videos[-1]
print(yt.title)
print(yt.streams)
YouTube Rewind 2010: Year in Review
StreamsManager(29 streams)
[pause]
[pause]
Youtube Rewind 2020, Thank God It's Over
StreamsManager(93 streams)