mirror of
https://gitlab.com/vyla-entertainment/documentation.git
synced 2026-11-16 07:27:21 -05:00
2.0 KiB
2.0 KiB
Vyla SDK (@vyla-entertainment/sdk)
The official Node.js scraping and resolver library for movies, television series, subtitles, downloads, and manga.
Overview
@vyla-entertainment/sdk is the core media resolver engine for Vyla. It runs in Node.js (ES Modules) to query 60+ streaming scrapers, extract subtitles, find media downloads, and browse manga archives.
Installation
npm install @vyla-entertainment/sdk
Requirements:
- Node.js v20+ (ES Modules)
- Optional: TMDB API key for title metadata
Capabilities
- Streaming: Resolve direct MP4 and adaptive HLS (
.m3u8) links withgetStream(),getSources(), andprobeSource(). - Subtitles: Fetch
.vttand.srtsubtitle tracks withgetSubtitles(). - Downloads: Find direct video files with file size metadata using
getDownloads(). - Manga: Search titles, list chapters, and fetch page images with
searchManga()andgetMangaChapter().
Quick Example
import VylaSDK from '@vyla-entertainment/sdk';
const sdk = new VylaSDK({
tmdbApiKey: process.env.TMDB_API_KEY
});
const sources = sdk.getSources(true);
console.log(`Active sources: ${sources.length}`);
try {
const stream = await sdk.getStream('vidlink', 155);
console.log(stream.url, stream.type);
} catch (err) {
console.error(err.message);
}
const subtitles = await sdk.getSubtitles(155);
console.log(`Subtitles found: ${subtitles.length}`);
Documentation Sections
- Quickstart — Step-by-step tutorial for movies, TV episodes, and error handling.
- API Reference — Complete methods, arguments, return shapes, and TypeScript types.
- Manga Module — Manga search, chapter indexes, and page loading.
- Contributing Scrapers — How to write and test new source scrapers.