load#
- load(file, format=None, encoding=None)[source]#
Loads subtitles from a file.
file
is preferably apathlib.Path
object, but may also be a string denoting an absolute or relative file path.The file
format
, if not explicitly specified, is deduced from the file ending. The file’s textencoding
can be given, but is otherwise detected automatically (which may fail in some rare cases).Returns a
Subtitles
object.