yifysubtitles
Advanced tools
Comparing version 2.1.2 to 2.1.3
@@ -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
184
10121
9
85
+ Added@sindresorhus/is@0.14.0(transitive)
+ Added@szmarczak/http-timer@1.1.2(transitive)
+ Addedbig-integer@1.6.52(transitive)
+ Addedcacheable-request@6.1.0(transitive)
+ Addedcheerio@1.0.0(transitive)
+ Addedcheerio-select@2.1.0(transitive)
+ Addedclone-response@1.0.3(transitive)
+ Addedcss-select@5.1.0(transitive)
+ Addedcss-what@6.1.0(transitive)
+ Addeddecompress-response@3.3.0(transitive)
+ Addeddefer-to-connect@1.1.3(transitive)
+ Addeddom-serializer@2.0.0(transitive)
+ Addeddomelementtype@2.3.0(transitive)
+ Addeddomhandler@5.0.3(transitive)
+ Addeddomutils@3.2.2(transitive)
+ Addedencoding-sniffer@0.2.0(transitive)
+ Addedentities@4.5.0(transitive)
+ Addedget-stream@4.1.05.2.0(transitive)
+ Addedgot@9.6.0(transitive)
+ Addedhtmlparser2@9.1.0(transitive)
+ Addedhttp-cache-semantics@4.1.1(transitive)
+ Addediconv-lite@0.6.3(transitive)
+ Addedjson-buffer@3.0.0(transitive)
+ Addedkeyv@3.1.0(transitive)
+ Addedlowercase-keys@2.0.0(transitive)
+ Addedmimic-response@1.0.1(transitive)
+ Addednormalize-url@4.5.1(transitive)
+ Addednth-check@2.1.1(transitive)
+ Addedp-cancelable@1.1.0(transitive)
+ Addedparse5@7.2.1(transitive)
+ Addedparse5-htmlparser2-tree-adapter@7.1.0(transitive)
+ Addedparse5-parser-stream@7.1.2(transitive)
+ Addedprepend-http@2.0.0(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedresponselike@1.0.2(transitive)
+ Addedto-readable-stream@1.0.0(transitive)
+ Addedundici@6.21.1(transitive)
+ Addedunzipper@0.9.15(transitive)
+ Addedurl-parse-lax@3.0.0(transitive)
+ Addedwhatwg-encoding@3.1.1(transitive)
+ Addedwhatwg-mimetype@4.0.0(transitive)
- Removedbuffer-shims@1.0.0(transitive)
- Removedcapture-stack-trace@1.0.2(transitive)
- Removedcheerio@0.22.0(transitive)
- Removedcreate-error-class@3.0.2(transitive)
- Removedcss-select@1.2.0(transitive)
- Removedcss-what@2.1.3(transitive)
- Removeddom-serializer@0.1.1(transitive)
- Removeddomelementtype@1.3.1(transitive)
- Removeddomhandler@2.4.2(transitive)
- Removeddomutils@1.5.1(transitive)
- Removedentities@1.1.2(transitive)
- Removedget-stream@3.0.0(transitive)
- Removedgot@6.7.1(transitive)
- Removedhtmlparser2@3.10.1(transitive)
- Removedis-redirect@1.0.0(transitive)
- Removedis-retry-allowed@1.2.0(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedlodash.assignin@4.2.0(transitive)
- Removedlodash.bind@4.2.1(transitive)
- Removedlodash.defaults@4.2.0(transitive)
- Removedlodash.filter@4.6.0(transitive)
- Removedlodash.flatten@4.4.0(transitive)
- Removedlodash.foreach@4.5.0(transitive)
- Removedlodash.map@4.6.0(transitive)
- Removedlodash.merge@4.6.2(transitive)
- Removedlodash.pick@4.4.0(transitive)
- Removedlodash.reduce@4.6.0(transitive)
- Removedlodash.reject@4.6.0(transitive)
- Removedlodash.some@4.6.0(transitive)
- Removednth-check@1.0.2(transitive)
- Removedprepend-http@1.0.4(transitive)
- Removedprocess-nextick-args@1.0.7(transitive)
- Removedreadable-stream@2.1.53.6.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedstring_decoder@1.3.0(transitive)
- Removedtimed-out@4.0.1(transitive)
- Removedunzip-response@2.0.1(transitive)
- Removedunzipper@0.7.6(transitive)
- Removedurl-parse-lax@1.0.0(transitive)
Updatedcheerio@^1.0.0-rc.2
Updatedglobal@^4.3.2
Updatedgot@^9.2.0
Updatedp-map@^1.2.0
Updatedsrt-to-vtt@^1.1.3
Updatedstreamz@^1.8.5
Updatedunzipper@^0.9.3