add vidnest

This commit is contained in:
Aykhan 2025-08-26 00:01:03 +04:00
parent 41fbb094d7
commit 1c6c2ac692
3 changed files with 136 additions and 0 deletions

View file

@ -38,6 +38,12 @@ import {
} from './embeds/streamwish';
import { vidCloudScraper } from './embeds/vidcloud';
import { vidifyEmbeds } from './embeds/vidify';
import {
vidnestAllmoviesEmbed,
vidnestFlixhqEmbed,
vidnestHollymoviehdEmbed,
vidnestOfficialEmbed,
} from './embeds/vidnest';
import {
VidsrcsuServer10Scraper,
VidsrcsuServer11Scraper,
@ -78,6 +84,7 @@ import { soaperTvScraper } from './sources/soapertv';
import { streamboxScraper } from './sources/streambox';
import { vidapiClickScraper } from './sources/vidapiclick';
import { vidifyScraper } from './sources/vidify';
import vidnestScraper from './sources/vidnest';
import { warezcdnScraper } from './sources/warezcdn';
import { wecimaScraper } from './sources/wecima';
import { zunimeScraper } from './sources/zunime';
@ -117,6 +124,7 @@ export function gatherAllSources(): Array<Sourcerer> {
rgshowsScraper,
vidifyScraper,
zunimeScraper,
vidnestScraper,
animetsuScraper,
lookmovieScraper,
];
@ -175,5 +183,9 @@ export function gatherAllEmbeds(): Array<Embed> {
...vidifyEmbeds,
...zunimeEmbeds,
...AnimetsuEmbeds,
vidnestHollymoviehdEmbed,
vidnestAllmoviesEmbed,
vidnestFlixhqEmbed,
vidnestOfficialEmbed,
];
}

View file

@ -0,0 +1,84 @@
import { flags } from '@/entrypoint/utils/targets';
import { makeEmbed } from '@/providers/base';
import { HlsBasedStream } from '@/providers/streams';
import { NotFoundError } from '@/utils/errors';
import { createM3U8ProxyUrl } from '@/utils/proxy';
export const vidnestHollymoviehdEmbed = makeEmbed({
id: 'vidnest-hollymoviehd',
name: 'HollyMovie',
rank: 104,
async scrape(ctx) {
const serverStreams = await ctx.proxiedFetcher<any>(ctx.url);
if (!serverStreams.success || !serverStreams.sources) throw new NotFoundError('No streams found');
const streams = [];
for (const source of serverStreams.sources) {
if (source.file.includes('pkaystream.cc/pl/')) {
streams.push({
id: `hollymoviehd-${source.label}`,
type: 'hls',
playlist: createM3U8ProxyUrl(source.file),
flags: [flags.CORS_ALLOWED],
captions: [],
} as HlsBasedStream);
}
}
return {
stream: streams,
};
},
});
export const vidnestAllmoviesEmbed = makeEmbed({
id: 'vidnest-allmovies',
name: 'AllMovies (Hindi)',
rank: 103,
async scrape(ctx) {
const serverStreams = await ctx.proxiedFetcher<any>(ctx.url);
if (!serverStreams.streams) throw new NotFoundError('No streams found');
const streams = [];
for (const stream of serverStreams.streams) {
streams.push({
id: `allmovies-${stream.language}`,
type: 'hls',
playlist: stream.url,
flags: [],
captions: [],
streamHeaders: stream.headers,
behaviorHints: {
proxyRequired: true,
},
meta: {
displayName: `AllMovies (${stream.language})`,
},
} as HlsBasedStream);
}
return {
stream: streams,
};
},
});
export const vidnestFlixhqEmbed = makeEmbed({
id: 'vidnest-flixhq',
name: 'FlixHQ',
rank: 102,
disabled: true,
async scrape() {
throw new Error('Not implemented');
},
});
export const vidnestOfficialEmbed = makeEmbed({
id: 'vidnest-official',
name: 'Official',
rank: 101,
disabled: true,
async scrape() {
throw new Error('Not implemented');
},
});

View file

@ -0,0 +1,40 @@
import { flags } from '@/entrypoint/utils/targets';
import { makeSourcerer } from '@/providers/base';
import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context';
const backendUrl = 'https://backend.vidnest.fun';
const servers = ['hollymoviehd', 'allmovies', 'flixhq', 'official'];
async function scrape(ctx: MovieScrapeContext | ShowScrapeContext, type: 'movie' | 'tv') {
const embeds = [];
for (const server of servers) {
let url = '';
if (type === 'movie') {
url = `${backendUrl}/${server}/movie/${ctx.media.tmdbId}`;
} else if (ctx.media.type === 'show') {
url = `${backendUrl}/${server}/tv/${ctx.media.tmdbId}/${ctx.media.season.number}/${ctx.media.episode.number}`;
}
embeds.push({
embedId: `vidnest-${server}`,
url,
});
}
return {
embeds,
};
}
const vidnestScraper = makeSourcerer({
id: 'vidnest',
name: 'Vidnest',
rank: 130,
flags: [flags.CORS_ALLOWED],
scrapeMovie: (ctx: MovieScrapeContext) => scrape(ctx, 'movie'),
scrapeShow: (ctx: ShowScrapeContext) => scrape(ctx, 'tv'),
});
export default vidnestScraper;