the other way
This commit is contained in:
parent
80cab8e4bb
commit
cc4ca18d7e
1 changed files with 2 additions and 2 deletions
|
@ -31,8 +31,8 @@ def srt2dict(srt, encoding = "utf-8"):
|
||||||
subtitle = subtitle.strip().split('\n')
|
subtitle = subtitle.strip().split('\n')
|
||||||
if len(subtitle) > 2:
|
if len(subtitle) > 2:
|
||||||
start_stop = subtitle[1].split(' --> ')
|
start_stop = subtitle[1].split(' --> ')
|
||||||
start_stop[0] = start_stop[0].split(' ')[-1]
|
start_stop[0] = start_stop[0].split(' ')[0]
|
||||||
start_stop[1] = start_stop[1].split(' ')[-1]
|
start_stop[1] = start_stop[1].split(' ')[0]
|
||||||
if start_stop[0][-4] == '.':
|
if start_stop[0][-4] == '.':
|
||||||
start_stop[0][:-4] + ',' + start_stop[0][-3:]
|
start_stop[0][:-4] + ',' + start_stop[0][-3:]
|
||||||
start_stop[1][:-4] + ',' + start_stop[1][-3:]
|
start_stop[1][:-4] + ',' + start_stop[1][-3:]
|
||||||
|
|
Loading…
Reference in a new issue