Subtitle¶
-
subliminal.subtitle.SUBTITLE_EXTENSIONS¶ Subtitle extensions
-
class
subliminal.subtitle.Subtitle(language, hearing_impaired=False, page_link=None, encoding=None)[source]¶ Base class for subtitle.
Parameters: -
provider_name= ''¶ Name of the provider that returns that class of subtitle
-
language= None¶ Language of the subtitle
-
hearing_impaired= None¶ Whether or not the subtitle is hearing impaired
-
page_link= None¶ URL of the web page from which the subtitle can be downloaded
-
content= None¶ Content as bytes
-
id¶ Unique identifier of the subtitle
-
text¶ Content as string
If
encodingis None, the encoding is guessed withguess_encoding()
-
is_valid()[source]¶ Check if a
textis a valid SubRip format.Returns: whether or not the subtitle is valid. Return type: bool
-
-
subliminal.subtitle.get_subtitle_path(video_path, language=None, extension='.srt')[source]¶ Get the subtitle path using the video_path and language.
Parameters: Returns: path of the subtitle.
Return type: