video_curation.youtube_client

A wrapper around Youtube API.

class video_curation.youtube_client.Channel(service_account_file=None, token_file_path=None, client_secret_file=None)[source]

Represents a YouTube channel.

get_uploads_playlist()[source]

Get the uploads playlist for this channel.

set_playlists()[source]

Set self.playlists.

set_uploaded_videos()[source]

Set self.uploaded_vids.

class video_curation.youtube_client.Playlist(api_service, title, id=None, description='', tags=[], privacy='public')[source]

Represents a YouTube playlist.

add_to_youtube()[source]

Add a new playlist at YouTube.

add_video(video_id, position=0)[source]

Insert a video into this playlist. Update YouTube as well.

add_videos(video_ids)[source]

Add multiple videos to this playlist. Update YouTube as well.

delete_video(video_id)[source]

Delete some video from this playlist. Update YouTube as well.

classmethod from_metadata(yt_metadata, api_service=None)[source]

Construct a :py:class:Playlist object from YouTube metadata.

get_playlist_videos()[source]
Returns:A list of :py:class:YtVideo objects.
sync_metadata_to_youtube()[source]

Set metadata info in YouTube.

class video_curation.youtube_client.YtVideo(id=None, title=None, description=None, tags=None, category_id=1, api_service=None, privacy='public')[source]

Represents a YouTube video.

classmethod from_playlist_item_metadata(yt_metadata, api_service=None)[source]

Create and return a YTVideo object

initialize_upload(filepath)[source]

Upload a new video to YouTube!

Parameters:filepath
Returns:
set_youtube_privacy()[source]

Update YouTube privacy setting for this video.

sync_metadata_to_youtube()[source]

Set title etc in YouTube.

Returns: