Skip to content

Instantly share code, notes, and snippets.

View briankung's full-sized avatar

Brian Kung briankung

  • Chicago
View GitHub Profile
@briankung
briankung / youtube2srt.rb
Last active June 7, 2018 22:31 — forked from lsloan/ Convert video subtitles from YouTube XML format to SubRip (.srt)
Convert XML Youtube subtitles to SubRip (srt) from YouTube ID or XML file
# Convert XML Youtube subtitles to SubRip (srt) format
# To download the subtitle in XML, put the code of the Youtube video
# at the end of the next url:
# http://video.google.com/timedtext?hl=en&lang=en&v=
# Usage:
#
# $ ruby youtube2srt.rb [input_filename] [output_filename]
#
# Where input_filename can be either the name of your xml file