0.1.0 • Published 6 years ago

@joegesualdo/get-youtube-subtitles-node v0.1.0

Weekly downloads
267
License
MIT
Repository
github
Last release
6 years ago

@joegesualdo/get-youtube-subtitles-node Build Status

Get the subtitles of a youtube video.

Install

$ npm install --save @joegesualdo/get-youtube-subtitles-node 

Usage

var getYoutubeSubtitles = require('@joegesualdo/get-youtube-subtitles-node');

let videoId = 'q_q61B-DyPk'

getYoutubeSubtitles(videoId)
.then(subtitles => {
  console.log(subtitles)
})
.catch(err => {
  console.log(err)
})

Test

$ npm test

API

getYoutubeSubtitles(youtubeVideoId, options)

Returns a promise that passes the resulting subtitles json.

NameTypeDescription
youtubeVideoIdNumberThe id of the video you want to get the subtitles for

Options

NameTypeDefaultOptionsDescription
typeStringeitherauto, nonauto, eitherThe id of the video you want to get the subtitles for

Returns: Promise, that passes the resulting subtitles.

var getYoutubeSubtitles = require('@joegesualdo/get-youtube-subtitles-node');

let videoId = 'q_q61B-DyPk'

getYoutubeSubtitles(videoId, {type: 'nonauto'})
.then(subtitles => {
  console.log(subtitles)
})
.catch(err => {
  console.log(err)
})

Build

$ npm run build

Related

License

MIT © Joe Gesualdo

0.1.0

6 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago