Download and convert subtitles in VTT format for YTS movies
$ npm i yifysubtitles --save
Or using yarn
$ yarn add yifysubtitles
const yifysubtitles = require('yifysubtitles');
const results = await yifysubtitles('tt1156398', {
path: '/tmp',
langs: ['en', 'fr', 'zh']
});
console.log(results)
/*
[
{
lang: 'english',
langShort: 'en',
path: '/tmp/Zombieland.2009.720p.BrRip.x264-YIFY.vtt',
fileName: 'Zombieland.2009.720p.BrRip.x264-YIFY.vtt'
},
...
]
*/
Returns an Array
of the downloaded subtitles.
Type: String
Type: Object
Type: Array
Default: ['en']
Array of the langs wanted.
Type: String
Default: __dirname
The path where the subtitles are going to be stored.
Type: String
Default: vtt
The format of subtitles. ['srt', 'vtt']
Type: number
Default: Infinity
Minimum: 1
Download multiples subtitles concurency.
MIT © Mrdotb