Package Exports
- ktuvit-api
- ktuvit-api/ktuvitManager.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ktuvit-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Ktuvit.me API
Ktuvit is a community based site for hebrew subtitles. It was previously known as Screwzira and was hosted under the same name. Ever since ktuvit moved to a new domain they decided to close their API and calls to bring it back were unanswered. Recently I built a project and needed a quick access to Ktuvit's database so I built this API.
Disclaimer: This is'nt really an API but a scraper.
Disclaimer: I'm by no means affiliated or am a part of Ktuvit. If this project breaks the site's TOS, reach out to me and I will terminate it.
Installation
Install the API using npm:
npm i ktuvit-apiUsage
This API let's you interact with Ktuvit.me subtitles database directly from node. With this module you can search, get a movie's Ktuvit Id, get a movie's subtitle list, download subtitles and more.
You can learn more about the API here!
Examples
here we are downloading the first subtitle for "Pulp Fiction" and saving it locally:
const KtuvitManager = require('ktuvit-api');
const fs = require('fs');
const manager = new ktuvitManager('u=###&g=###');
const pulpFictionKtuvitID = await manager.getKtuvitID({imdbId: 'tt0110912', name: 'Pulp Fiction'});
const firstSub = await manager.getSubsIDsListMovie(pulpFictionKtuvitID)[0];
manager.downloadSubtitle(pulpFictionKtuvitID, firstSub.id, function(buffer){
fs.writeFile('pulp-fiction.srt', buffer, function (err) {
if (err) return console.log(err);
console.log('SRT is ready!');
});
});
Contributing
Since I've built this API for my needs and in a rush it's probably lacking a lot of features so pull requests are very welcomed! If you found a bug please open an issue.
TODO
Feel free to help with these:
- Cache system
- Better error handling.
- Add documentation.
- Translate the readme.