add hollymoviehd

Update hollymoviehd.ts

Update hollymoviehd.ts
This commit is contained in:
Pas 2025-05-21 20:45:37 -06:00
parent 2cc42076af
commit 298fad5413
2 changed files with 61 additions and 0 deletions

View file

@ -96,6 +96,7 @@ import { cuevana3Scraper } from './sources/cuevana3';
import { embedsuScraper } from './sources/embedsu';
import { FedAPIScraper } from './sources/fedapi';
import { hdRezkaScraper } from './sources/hdrezka';
import { hollymoviehdScraper } from './sources/hollymoviehd';
import { iosmirrorScraper } from './sources/iosmirror';
import { iosmirrorPVScraper } from './sources/iosmirrorpv';
import { nunflixScraper } from './sources/nunflix';
@ -145,6 +146,7 @@ export function gatherAllSources(): Array<Sourcerer> {
wecimaScraper,
animeflvScraper,
cinemaosScraper,
hollymoviehdScraper,
];
}

View file

@ -0,0 +1,59 @@
import CryptoJS from 'crypto-js';
import { flags } from '@/entrypoint/utils/targets';
import { SourcererOutput, makeSourcerer } from '@/providers/base';
import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context';
import { NotFoundError } from '@/utils/errors';
import { convertPlaylistsToDataUrls } from '@/utils/playlist';
const VRF_SECRET_KEY = atob('c3VwZXJzZWNyZXRrZXk=');
const apiBase = 'https://reyna.bludclart.com/api/source/hollymoviehd';
function generateVrf(tmdbId: string | number, season: string | number = '', episode: string | number = ''): string {
const msg = `${tmdbId}:${season}:${episode}`;
const hash = CryptoJS.HmacSHA256(msg, VRF_SECRET_KEY);
return hash.toString(CryptoJS.enc.Hex);
}
async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promise<SourcererOutput> {
let url = `${apiBase}/${ctx.media.tmdbId}`;
let season = '';
let episode = '';
if (ctx.media.type === 'show') {
season = ctx.media.season.number.toString();
episode = ctx.media.episode.number.toString();
url += `/${season}/${episode}`;
}
const vrf = generateVrf(ctx.media.tmdbId, season, episode);
url += `?vrf=${vrf}`;
const data = await ctx.proxiedFetcher(url);
const firstUrl = data?.sources?.[0]?.file;
if (!firstUrl) throw new NotFoundError('Sources not found.');
ctx.progress(50);
ctx.progress(90);
return {
embeds: [],
stream: [
{
id: 'primary',
type: 'hls',
playlist: await convertPlaylistsToDataUrls(ctx.proxiedFetcher, firstUrl),
proxyDepth: 2,
flags: [flags.CORS_ALLOWED],
captions: [],
},
],
};
}
export const hollymoviehdScraper = makeSourcerer({
id: 'hollymoviehd',
name: 'HollyMovieHD',
rank: 180,
disabled: false,
flags: [flags.CORS_ALLOWED],
scrapeMovie: comboScraper,
scrapeShow: comboScraper,
});