ytdl_subscribe.downloaders package

Submodules

ytdl_subscribe.downloaders.downloader module

class ytdl_subscribe.downloaders.downloader.Downloader(working_directory: str, ytdl_options: Optional[Dict] = None, download_archive_file_name: Optional[str] = None)

Bases: object

Class that interacts with ytdl to perform the download of metadata and content, and should translate that to list of Entry objects.

extract_info(ytdl_options_overrides: Optional[Dict] = None, **kwargs) Dict

Wrapper around yt_dlp.YoutubeDL.YoutubeDL.extract_info All kwargs will passed to the extract_info function.

ytdl_downloader(ytdl_options_overrides: Optional[Dict] = None) yt_dlp.YoutubeDL.YoutubeDL

Context manager to interact with yt_dlp.

classmethod ytdl_option_defaults() Dict

Downloader defaults that can be overwritten from user input

classmethod ytdl_option_overrides() Dict

Global overrides that even overwrite user input

ytdl_subscribe.downloaders.soundcloud_downloader module

class ytdl_subscribe.downloaders.soundcloud_downloader.SoundcloudDownloader(working_directory: str, ytdl_options: Optional[Dict] = None, download_archive_file_name: Optional[str] = None)

Bases: ytdl_subscribe.downloaders.downloader.Downloader

Class that handles downloading soundcloud entries via ytdl and converting them into SoundcloudTrack / SoundcloudAlbumTrack objects

classmethod artist_url(artist_name: str) str

Returns full artist url

download_albums(artist_name: str) List[ytdl_subscribe.entries.soundcloud.SoundcloudAlbum]

Given an artist name, download all of their albums

download_tracks(artist_name) List[ytdl_subscribe.entries.soundcloud.SoundcloudTrack]

Given an artist name, download all of their tracks

classmethod ytdl_option_defaults() Dict

Returns default format to be best mp3

ytdl_subscribe.downloaders.youtube_downloader module

class ytdl_subscribe.downloaders.youtube_downloader.YoutubeDownloader(working_directory: str, ytdl_options: Optional[Dict] = None, download_archive_file_name: Optional[str] = None)

Bases: ytdl_subscribe.downloaders.downloader.Downloader

Class that handles downloading youtube entries via ytdl and converting them into YoutubeVideo objects

classmethod channel_url(channel_id: str) str

Returns full channel url

download_channel(channel_id: str) List[ytdl_subscribe.entries.youtube.YoutubeVideo]

Downloads all videos from a channel

download_playlist(playlist_id: str) List[ytdl_subscribe.entries.youtube.YoutubeVideo]

Downloads all videos in a Youtube playlist

download_video(video_id: str) ytdl_subscribe.entries.youtube.YoutubeVideo

Download a single Youtube video

classmethod playlist_url(playlist_id: str) str

Returns full playlist url

classmethod video_url(video_id: str) str

Returns full video url

Module contents