handle srts with empty subs
This commit is contained in:
parent
5ddf7970b9
commit
b76bb80577
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ def load(filename, offset=0):
|
|||
return srt
|
||||
|
||||
data = data.replace('\r\n', '\n')
|
||||
srts = re.compile('(\d\d:\d\d:\d\d[,.]\d\d\d)\s*-->\s*(\d\d:\d\d:\d\d[,.]\d\d\d)\s*?(.+?)\n\n', re.DOTALL)
|
||||
srts = re.compile('(\d\d:\d\d:\d\d[,.]\d\d\d)\s*?-->\s*?(\d\d:\d\d:\d\d[,.]\d\d\d)\s*?(.*?)\n\n', re.DOTALL)
|
||||
i = 0
|
||||
for s in srts.findall(data):
|
||||
_s = {'id': str(i),
|
||||
|
|
Loading…
Reference in a new issue