diff --git a/ox/srt.py b/ox/srt.py index 21905bc..5191a55 100644 --- a/ox/srt.py +++ b/ox/srt.py @@ -80,6 +80,8 @@ def load(filename, offset=0): return srt data = data.replace('\r\n', '\n') + if not data.endswith('\n\n'): + data += '\n\n' regexp = r'(\d\d:\d\d:\d\d[,.]\d\d\d)\s*?-->\s*?(\d\d:\d\d:\d\d[,.]\d\d\d).*?\n(.*?)\n\n' srts = re.compile(regexp, re.DOTALL) i = 0