Skip to content

Instantly share code, notes, and snippets.

@xloem
xloem / vtt2text.py
Last active Dec 1, 2021 — forked from glasslion/vtt2text.py
This script convert youtube subtitle file(vtt) to plain text.
View vtt2text.py
"""
Convert YouTube subtitles(vtt) to human readable text.
Download only subtitles from YouTube with youtube-dl:
youtube-dl --skip-download --convert-subs vtt <video_url>
Note that default subtitle format provided by YouTube is ass, which is hard
to process with simple regex. Luckily youtube-dl can convert ass to vtt, which
is easier to process.
View gist:e20f95a65b2d4ccccce40dc1b540af1b
./runtests.sh
ConnectorDB v0.3.0git1112
arch: linux/amd64
go: go1.6.2
git: b4e83f0a886912f693a9cb3f7caf80599cc5c965
build: 2017-01-04_11:19:15AM
Waiting for servers to start...
My PID 31360
postgres: no process found
View gist:56ff8055cc40312593fab3702709f003
./runtests.sh
ConnectorDB v0.3.0git1112
arch: linux/amd64
go: go1.6.2
git: b4e83f0a886912f693a9cb3f7caf80599cc5c965
build: 2017-01-04_11:19:15AM
Waiting for servers to start...
My PID 20758
postgres: no process found