New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

yifysubtitles

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yifysubtitles - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3

examples/test.js

2

langs.json

@@ -14,3 +14,3 @@ {

"et": "estonian",
"fa": "farsi-persian",
"ir": "farsi/persian",
"fi": "finnish",

@@ -17,0 +17,0 @@ "fr": "french",

{
"name": "yifysubtitles",
"version": "2.1.2",
"version": "2.1.3",
"description": "A simple wrapper to download subtitles from the yifysubtitles website.",

@@ -23,13 +23,13 @@ "license": "MIT",

"dependencies": {
"cheerio": "^0.22.0",
"global": "^4.3.1",
"got": "^6.6.3",
"p-map": "^1.1.0",
"srt-to-vtt": "^1.1.1",
"streamz": "^1.6.2",
"unzipper": "^0.7.2"
"cheerio": "^1.0.0-rc.2",
"global": "^4.3.2",
"got": "^9.2.0",
"p-map": "^1.2.0",
"srt-to-vtt": "^1.1.3",
"streamz": "^1.8.5",
"unzipper": "^0.9.3"
},
"devDependencies": {
"ava": "^0.17.0",
"pify": "^2.3.0"
"ava": "^0.25.0",
"pify": "^4.0.0"
},

@@ -36,0 +36,0 @@ "keywords": [

[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![Build Status](https://travis-ci.org/MRdotB/yifysubtitles.svg?branch=master)](https://travis-ci.org/MRdotB/yifysubtitles)
[![Build Status](https://travis-ci.org/mrdotb/yifysubtitles.svg?branch=master)](https://travis-ci.org/mrdotb/yifysubtitles)

@@ -10,7 +10,7 @@ # yifysubtitles

```
```bash
$ npm i yifysubtitles --save
```
Or using yarn
```
```bash
$ yarn add yifysubtitles

@@ -25,22 +25,18 @@ ```

yifysubtitles('tt1156398', {path: '/tmp', langs: ['en', 'fr', 'zh']})
.then(res => {
console.log(res);
const results = await yifysubtitles('tt1156398', {
path: '/tmp',
langs: ['en', 'fr', 'zh']
});
console.log(results)
/*
=>
res [ { lang: 'english',
[
{
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' } ]
fileName: 'Zombieland.2009.720p.BrRip.x264-YIFY.vtt'
},
...
]
*/
})
.catch(err => console.log(err));
```

@@ -79,3 +75,3 @@

Default: `vtt`<br>
The format of subtitles.
The format of subtitles. ['srt', 'vtt']

@@ -82,0 +78,0 @@ ##### concurrency

@@ -48,5 +48,14 @@ import fs from 'fs';

test('download rango subtitles in ir', async t => {
const subtitles = await yifysubtitles('tt1192628', {path: downloadDir, langs: ['ir']});
t.is(subtitles.length, 1, 'results length should be 1');
const paths = subtitles.map(subtitle => subtitle.path);
await pMap(paths, path => t.notThrows(pify(fs.access)(path), 'file should exist'));
await pMap(paths, path => pify(fs.unlink)(path));
});
test.after.always('cleanup: delete tmp dir', async t => {
await pify(fs.rmdir)(downloadDir);
});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc