webvtt-py 0.4.2
webvtt-py is a Python module for reading/writing WebVTT caption files. It also features caption segmentation useful when captioning HLS videos.
Requires Python 3.4+.
Documentation is available at http://webvtt-py.readthedocs.io.
Installation
$ pip install webvtt-pyUsage
import webvtt for caption in webvtt.read('captions.vtt'): print(caption.start) print(caption.end) print(caption.text)