https://github.com/mrdotb/yifysubtitles
https://github.com/mrdotb/yifysubtitles
yifysubtitles
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mrdotb/yifysubtitles
- Owner: mrdotb
- License: mit
- Created: 2016-12-11T19:03:18.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T03:36:41.000Z (over 2 years ago)
- Last Synced: 2025-04-13T10:49:50.610Z (about 2 months ago)
- Topics: yifysubtitles
- Language: JavaScript
- Size: 954 KB
- Stars: 12
- Watchers: 4
- Forks: 7
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
[](https://github.com/sindresorhus/xo)
[](https://travis-ci.org/mrdotb/yifysubtitles)# yifysubtitles
> Download and convert subtitles in [VTT format](https://developer.mozilla.org/en/docs/Web/API/Web_Video_Text_Tracks_Format) for [YTS movies](https://yts.ag/)## Install
```bash
$ npm i yifysubtitles --save
```
Or using yarn
```bash
$ yarn add yifysubtitles
```## Usage
```js
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](https://github.com/MRdotB)