diff --git a/pysrt/srtfile.py b/pysrt/srtfile.py index c03595a..7e654a4 100644 --- a/pysrt/srtfile.py +++ b/pysrt/srtfile.py @@ -51,6 +51,9 @@ def __init__(self, items=None, eol=None, path=None, encoding='utf-8'): self.path = path self.encoding = encoding + def __getitem__(self, index): + return self.data[index] + def _get_eol(self): return self._eol or os.linesep