0.1.9 • Published 2 years ago

youtube-subs-json v0.1.9

Weekly downloads
4
License
GPL-3.0-or-later
Repository
github
Last release
2 years ago

youtube-subs-json

Get captions as json from youtube by youtube-dl

Installation

  • > npm install youtube-subs-json

Usage

const getSubtitles = require('youtube-subs-json').getSubtitles;

getSubtitles({
  videoID: 'XXXXX', // youtube video id or url
  lang: 'ru' // default: `en`
}).then( captions => {
  console.log(captions)
}).catch( err => {
  console.error(err)
})

Captions will be an array of object of this format:

{
  "begin": String, // 00:00:03.419
  "end": String,   // 00:00:10.320
  "start": Number, // 3.419
  "dur": Number,   // 6.901
  "text": String   // some phrase
}
0.1.9

2 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.2

4 years ago

0.1.3

4 years ago

0.1.1

5 years ago

0.1.0

5 years ago