Constructor

class PlaylistVideo(**kwargs)

    Represents a YouTube video inside a playlist, with lazy loading of the actual YouTube object.

Parameters:

    title str The title of the video.
    link str YouTube URL to the video.
    duration int The video duration in seconds.
    channel MyTube.Channel The channel object that uploaded the video.
    thumbnail MyTube.Thumbnail A thumbnail object representing the video thumbnail.
    cookies list A list of cookies for loading the video.

Properties

    YouTube video URL.

							title
							str
							
						

    Video title.

							duration
							int
							
						

    Video duration in seconds.

							author
							str
							
						

    The name of the channel's author.

							channel
							MyTube.Channel
							
						

    The channel object representing the video's uploader.

							thumbnail
							MyTube.Thumbnail
							
						

    The thumbnail object representing the video's thumbnail image.

Methods

							load() ->
							MyTube.YouTube
							
						

    Lazily loads the YouTube object for the video.

Example

Lazy loading

import MyTube

link = "https://www.youtube.com/playlist?list=PLBnetXbvs5BGzGIsoxe6MYhX1hB7iRoOD"
p = MyTube.Playlist(link)

for video in p.raw_videos:
	if video:
		print(video.title)

		print("loading...")
		yt = video.load()

		print(yt.title)
		print(yt.streams)
		break
	else:
		print("DeletedVideo")
YouTube Rewind 2010: Year in Review
loading...
[pause]
[pause]

YouTube Rewind 2010: Year in Review
StreamsManager(29 streams)