the other way

This commit is contained in:
j 2007-08-03 09:57:02 +00:00
parent 80cab8e4bb
commit cc4ca18d7e
1 changed files with 2 additions and 2 deletions

View File

@ -31,8 +31,8 @@ def srt2dict(srt, encoding = "utf-8"):
subtitle = subtitle.strip().split('\n')
if len(subtitle) > 2:
start_stop = subtitle[1].split(' --> ')
start_stop[0] = start_stop[0].split(' ')[-1]
start_stop[1] = start_stop[1].split(' ')[-1]
start_stop[0] = start_stop[0].split(' ')[0]
start_stop[1] = start_stop[1].split(' ')[0]
if start_stop[0][-4] == '.':
start_stop[0][:-4] + ',' + start_stop[0][-3:]
start_stop[1][:-4] + ',' + start_stop[1][-3:]