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.
Install the API using npm:
npm i ktuvit-api
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!
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!');
});
});
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.
Feel free to help with these:
- Cache system
- Better error handling.
- Add documentation.
- Translate the readme.