Skip to content

Definisi/vidsrc-scrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@definisi/vidsrc-scraper

Extract HLS streaming URLs from VidSrc using pure HTTP requests.

Installation

npm install @definisi/vidsrc-scraper

Usage

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

  1. Fetches embed page from vidsrc-embed.ru
  2. Extracts RCP iframe URL from cloudnestra.com
  3. Extracts prorcp hash from RCP page
  4. Fetches M3U8 URL from prorcp endpoint
  5. Resolves domain placeholders ({v1} - {v5} -> cloudnestra.com)

Requirements

  • Node.js 18+

License

MIT

About

deez nuts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors