Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

yifysubtitles

mrdotb249MIT2.1.5

A simple wrapper to download subtitles from the yifysubtitles website.

download, html5, films, movies, srt, sub, subs, subtitles, video, vtt, yify, yifysubs, yifysubtitles, yts, ytssubs, zip

readme

XO code style Build Status

yifysubtitles

Download and convert subtitles in VTT format for YTS movies

Install

$ npm i yifysubtitles --save

Or using yarn

$ yarn add yifysubtitles

Usage

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'
  },
  ...
]
*/

API

yifysubtitles(imdbId, [options])

Returns an Array of the downloaded subtitles.

imdbId

Type: String

options

Type: Object

langs

Type: Array
Default: ['en']
Array of the langs wanted.

path

Type: String
Default: __dirname
The path where the subtitles are going to be stored.

format

Type: String
Default: vtt
The format of subtitles. ['srt', 'vtt']

concurrency

Type: number
Default: Infinity
Minimum: 1 Download multiples subtitles concurency.

License

MIT © Mrdotb