Parses webvtt and returns timestamps for words and lines
    Tested on automatically generated subtitles from YouTube

def parse_auto_sub(text):
    '''
    Parses webvtt and returns timestamps for words and lines
    Tested on automatically generated subtitles from YouTube
    '''

    pat = r'<(\d\d:\d\d:\d\d(\.\d+)?)>'
    out = []

    lines = []
    data = text.split('\n')
    data = [d for d in data if re.search(r'\d\d:\d\d:\d\d', d) is not None]
    for i, d in enumerate(data):
        if re.search(pat, d):
            lines.append((data[i-1], d))

    if len(lines) > 0:
        out = parse_cued(lines)
    else:
        out = parse_uncued(text)

    return out