New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ytssubs

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ytssubs

A yifysubtitles.com subtitles API

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

ytssubs

A Node.js API for yifysubtitles.com

NPM

Installation

  • npm install ytssubs

Usage

Get subtitles list by IMDB id

const ytssubs = require('ytssubs')

ytssubs.getSubs('tt1192628', (err, results) => { // also works without 'tt'
  console.log(results)
})

/*
{ langs:
   [ 'Arabic', 'Brazilian Portuguese', 'Chinese', 'Dutch', 'English', 'Farsi/Persian', 'Finnish', 'French', 'Greek', 'Hebrew', 'Indonesian', 'Italian', 'Korean', 'Malay', 'Norwegian', 'Romanian', 'Serbian', 'Spanish' ],
  subs_count: 25,
  subs:
   [ { lang: 'English',
       name: 'Rango',
       url: 'http://www.yifysubtitles.com/subtitle/rango-english-yify-1787.zip',
       uploader: 'sub',
       rating: '6' },
     { lang: 'Arabic',
       name: 'Rango',
       url: 'http://www.yifysubtitles.com/subtitle/rango-arabic-yify-1786.zip',
       uploader: 'sub',
       rating: '3' } ...etc
   ]
}
*/

Download subtitles by URL

const ytssubs = require('ytssubs')

ytssubs.downloadSubs('http://www.yifysubtitles.com/subtitle/rango-english-yify-1787.zip', `${__dirname}/subs`}, () => {
  console.log('Your subtitle has been downloaded')
})

/*
You have to provide a file path
The subtitle is downloaded as .srt.
*/

Packages

License

This project is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software. But you always need to state that Mike Kokkolios is the original author of this template.

Project is developed and maintained by Mike Kokkolios.

Keywords

yts

FAQs

Package last updated on 13 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts