0.1.9 • Published 4 years ago

youtube-subs-json v0.1.9

Weekly downloads
4
License
GPL-3.0-or-later
Repository
github
Last release
4 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

4 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

6 years ago

0.1.2

6 years ago

0.1.3

6 years ago

0.1.1

7 years ago

0.1.0

7 years ago