Code Monkey home page Code Monkey logo

yifysubtitles's Introduction

Build Status

yifysubtitles

Download and convert subtitles in VTT format for YTS movies

Install

$ npm i @amilajack/yifysubtitles --save

Or using yarn

$ yarn add @amilajack/yifysubtitles

Usage

const yifysubtitles = require('@amilajack/yifysubtitles');

await yifysubtitles('tt1156398', { path: '/tmp', langs: ['en', 'fr', 'zh'] });
/*
=>
res [ { lang: 'english',
    langShort: 'en',
    path: '/tmp/Zombieland.2009.720p.BrRip.x264-YIFY.vtt',
    fileName: 'Zombieland.2009.720p.BrRip.x264-YIFY.vtt' },
  { lang: 'french',
    langShort: 'fr',
    path: '/tmp/Zombieland.2009.720p.BrRip.x264-YIFY.www.subsynchro.com.vtt',
    fileName: 'Zombieland.2009.720p.BrRip.x264-YIFY.www.subsynchro.com.vtt' },
  { lang: 'chinese',
    langShort: 'zh',
    path: '/tmp/Zombieland.720p.BluRay.x264-CROSSBOW.cht.vtt',
    fileName: 'Zombieland.720p.BluRay.x264-CROSSBOW.cht.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

yifysubtitles's People

Stargazers

 avatar

Watchers

 avatar

Forkers

adamwoo2444

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.