ytdl_subscribe.entries package
Submodules
ytdl_subscribe.entries.entry module
- class ytdl_subscribe.entries.entry.BaseEntry(**kwargs)
Bases:
abc.ABCAbstract entry object to represent anything download from ytdl (playlist metadata, media, etc).
- property extractor: str
The ytdl extrator name
- Type
return
- kwargs(key) Any
Returns an internal kwarg value supplied from ytdl
- kwargs_contains(key: str) bool
Returns whether internal kwargs contains the specified key
- property playlist_metadata: Optional[ytdl_subscribe.entries.entry.PlaylistMetadata]
Reserved for any child entry class that resides in a playlist.
- Returns
Playlist metadata for this entry
- to_dict() Dict[str, str]
Returns the entry’s values as a dictionary
- property uid: str
Returns the entry’s unique id
- class ytdl_subscribe.entries.entry.Entry(**kwargs)
Bases:
ytdl_subscribe.entries.entry.BaseEntryEntry object to represent a single media object returned from yt-dlp.
- property description: str
- property download_file_name: str
Returns the entry’s file name when downloaded locally
- property download_thumbnail_name: str
Returns the thumbnail’s file name when downloaded locally
- property ext: str
Returns the entry’s file extension
- property sanitized_title: str
Returns the entry’s sanitized title
- property thumbnail_ext: str
The entry’s thumbnail extension
- Type
return
- property title: str
Returns the entry’s title
- to_dict() Dict
Returns the entry’s values as a dictionary
- property upload_date: str
Returns the entry’s upload date
- property upload_date_standardized: str
upload date as YYYY-MM-DD
- Type
return
- property upload_day: int
Returns the entry’s upload month as an int
- property upload_day_padded: str
Returns the entry’s upload day, padded
- property upload_month: int
Returns the entry’s upload month as an int
- property upload_month_padded: str
Returns the entry’s upload month, padded
- property upload_year: int
Returns the entry’s upload year
ytdl_subscribe.entries.soundcloud module
- class ytdl_subscribe.entries.soundcloud.SoundcloudAlbum(**kwargs)
Bases:
ytdl_subscribe.entries.entry.EntryEntry object to represent a Soundcloud album.
- album_tracks(skip_premiere_tracks: bool = True) List[ytdl_subscribe.entries.soundcloud.SoundcloudAlbumTrack]
Returns all tracks in the album represented as album-tracks. They will share the same album name, have ordered track numbers, and a shared album year.
- property album_year: int
Returns the album’s year, computed by the max upload year amongst all album tracks
- contains(track: ytdl_subscribe.entries.soundcloud.SoundcloudTrack) bool
Returns whether the album contains a track
- property downloaded_track_count: int
- property track_count: int
- class ytdl_subscribe.entries.soundcloud.SoundcloudAlbumTrack(album: str, album_year: int, playlist_metadata: ytdl_subscribe.entries.entry.PlaylistMetadata, **kwargs)
Bases:
ytdl_subscribe.entries.soundcloud.SoundcloudTrackEntry object to represent a Soundcloud track yt-dlp that belongs to an album.
- property album: str
Returns the entry’s album name, fetched from its internal album
- property album_year: int
Returns the entry’s album year, fetched from its internal album
- classmethod from_soundcloud_track(album: str, album_year: int, soundcloud_track: ytdl_subscribe.entries.soundcloud.SoundcloudTrack, playlist_metadata: ytdl_subscribe.entries.entry.PlaylistMetadata) ytdl_subscribe.entries.soundcloud.SoundcloudAlbumTrack
- property playlist_metadata: Optional[ytdl_subscribe.entries.entry.PlaylistMetadata]
Reserved for any child entry class that resides in a playlist.
- Returns
Playlist metadata for this entry
- property track_number: int
Returns the entry’s track number
- class ytdl_subscribe.entries.soundcloud.SoundcloudTrack(**kwargs)
Bases:
ytdl_subscribe.entries.entry.EntryEntry object to represent a Soundcloud track yt-dlp that is a single, which implies it does not belong to an album.
- property album: str
Returns the entry’s album name. Since this is a single, set the album to the title
- property album_year: int
Returns the entry’s album year. Since this is a single, use the upload year
- property is_premiere: bool
Returns whether the entry is a premier track. Check this by seeing if the track’s url is a preview.
- property sanitized_album: str
Returns the entry’s sanitized album name
- to_dict() Dict
Returns the entry’s values as a dictionary.
- property track_number: int
Returns the entry’s track number. Since this is a single, it will always be 1
- property track_number_padded: str
Returns the entry’s padded track number, to the tens-place
ytdl_subscribe.entries.youtube module
- class ytdl_subscribe.entries.youtube.YoutubeVideo(**kwargs)
Bases:
ytdl_subscribe.entries.entry.EntryEntry object to represent a Youtube video.
- property title: str
Returns the title of the youtube video. Tries to get the track name if it is available, otherwise it falls back to the title.