Skip to content

Instantly share code, notes, and snippets.

@ilbonte
Created May 14, 2016 17:29
Show Gist options
  • Save ilbonte/e856a6338abfe60faf691b5bf4913c34 to your computer and use it in GitHub Desktop.
Save ilbonte/e856a6338abfe60faf691b5bf4913c34 to your computer and use it in GitHub Desktop.
Get the transcript for any youtube's video
/*
DOES NOT WORK WITH AUTOMATIC CAPTIONS!
How to:
1. open the javascript console
2. paste the code below and press enter
3. click on the link and open the page
4. If you need to download the subtitles: right click and save as .vtt (can be open with vlc)
*/
var id=window.location.search.split("v=")[1];
var lang='en'; //default language is english (see below)
console.log('http://video.google.com/timedtext?lang='+lang+'&v='+id+'&fmt=vtt');
//------------------------------------
//The default language is english (en) but you can check the available languages with:
console.log('available languages: https://video.google.com/timedtext?hl=en&v=' + id + '&type=list');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment