load¶
- load(file, format=None, encoding=None)[source]¶
Loads subtitles from a file.
fileis preferably apathlib.Pathobject, 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 textencodingcan be given, but is otherwise detected automatically (which may fail in some rare cases).Returns a
Subtitlesobject.