/yt-captions

Read Youtube transcript (captions) from any public Youtube video

Primary LanguageRuby

yt-captions

Read Youtube transcript (captions) from any public Youtube video

####Requirements PhantomJS http://phantomjs.org/download.html

require 'selenium-webdriver'
require 'nokogiri'

####Usage Start PhantomJS

bin/phantomjs --webdriver=9999

Run script

ruby yt_captions.rb http://www.youtube.com/watch?v=[video-id]
ruby yt_captions.rb [video-id]

Where [video-id] is the Youtube video ID.

####Output

0:04 ok
0:06 spending it just five inches tall fromher post her shoulder
0:10 little pixel could be the world'sshortest attack and even know pick so is
0:15 small in stature
0:16 she's big impasse manatee and requiresconstant attention
0:20 ok
0:25 they win hearts over like crazy peoplethat are cat people say oh my gosh now
0:29 that's cue
0:30 own a Tiffany charla God breeds theminiature felines
0:34 known as munchkin cats a higher ontemperature Area California
0:38 you can't leave doors opening you can'tlet you know print readers close to
0:42 quickly
0:43 because somebody might have snapped upin the bottom the door stuck their head
0:46 in there so
0:47 we kinda move slowly when we walk so wedon't kick your step on anybody
0:51 lord knows everybody's been probablycater stepped on at least once
0:54 because it's just what happens in asmall house although little mini
0:58 be but the controversial breed
1:01 have drawn criticism from some animallovers people who don't understand you
1:05 conjure play GH gene consider it agenetic defect or a mutation
1:09 or something this an abomination andthat's very unfair for them to say that
1:13 pixels mother fizz girl set the previousrecord for world's shortest can 2012
1:19 when she measured in at six inches tall
1:26 and with pixels measurement submitted toGuinness it could be that they'll simply
1:30 a new record holder in the family
1:44 good
1:46 hold