Closed llbaker302 closed 4 years ago
Disabling line 69/70 it converts it, but there's an extra blank line added to the end which makes the .srt unreadable e.g.
339 00:46:08,182 --> 00:46:11,185 Sous-titres : Anne-Pierre Hocquet
340
Has vtt_to_srt() been tested?
Downloaded a whole batch of subtitles using chrome developer tools and the string at the start is always: \ufeffWEBVTT changing this as the check on line 69 works for every file.
I also removed lines.append("\n".join(current_sub_line)) on line 83 and the issue of adding a blank line at the end is fixed.
@kewickviper thanks for reporting the bug and finding a fix. Do you want to create a Pull Request with or would you prefer if I did?
No worries have created pull request.
Tested on subtitle file attached, even though the file starts with "WEBVTT" it still throws the exception on line 70.
Vikings S04E01.zip