@definisi/vidsrc-scraper
v2.0.2
Published
Extract HLS streaming URLs from VidSrc using axios
Maintainers
Readme
@definisi/vidsrc-scraper
Extract HLS streaming URLs from VidSrc using pure HTTP requests.
Installation
npm install @definisi/vidsrc-scraperUsage
import { scrapeVidsrc } from '@definisi/vidsrc-scraper';
// Scrape a movie by TMDB ID
const result = await scrapeVidsrc('27205', 'movie');
if (result.success) {
console.log('HLS URL:', result.hlsUrl);
console.log('Subtitles:', result.subtitles);
}
// Scrape a TV episode
const tvResult = await scrapeVidsrc('1399', 'tv', '1', '1');Options
| Option | Type | Default | Description | |--------|------|---------|-------------| | timeout | number | 30000 | Request timeout in milliseconds | | cacheTtl | number | 900 | Cache time-to-live in seconds |
const result = await scrapeVidsrc('27205', 'movie', null, null, {
timeout: 60000,
cacheTtl: 1800,
});Result Type
interface ScrapeResult {
tmdbId: string;
type: 'movie' | 'tv';
season: string | null;
episode: string | null;
hlsUrl: string | null;
subtitles: string[];
success: boolean;
timestamp: string;
}Playback
The HLS URLs require proper headers. Example with VLC:
vlc "HLS_URL" \
--http-user-agent="Mozilla/5.0" \
--http-referrer="https://cloudnestra.com/"How It Works
- Fetches embed page from
vidsrc-embed.ru - Extracts RCP iframe URL from cloudnestra.com
- Extracts prorcp hash from RCP page
- Fetches M3U8 URL from prorcp endpoint
- Resolves domain placeholders (
{v1}-{v5}->cloudnestra.com)
Requirements
- Node.js 18+
License
MIT
