Documentation - MagikVision/pycaption GitHub Wiki
MVP Parser
Usage
from pycaption import MVPParser
parser = MVPParser()
# read method validates and parses the vtt file content and returns list of Caption objects
captions_list = parser.read(open('webvtt_file.vtt').read())
# get_formatted method takes Captions objects list and build a valid VTT
formatted_vtt_string = parser.get_formatted(captions_list)