You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yeah it would be nice if the file was parsed a line at a time so people could do something like this:
try:
out= []
forcaptioninwebvtt.read_generator(path):
try:
line=caption.text# or even .text() would be fineexceptwebvtt.MalformedCaptionError:
passelse:
out.append(remove_text_inside_brackets(line.replace("\n", " ")))
returnoutexceptwebvtt.MalformedFileError:
return []
Sometimes there are empty timestamps in the .vtt. The script errors out on them.
For example:
00:22:21.320 --> 00:22:26.520
00:21:13.720 --> 00:21:15.360 line:90% position:50% align:middle
Can this error somehow be captured or ignore the empty timestamps?
The text was updated successfully, but these errors were encountered: