mirror of
https://github.com/p-stream/providers.git
synced 2026-04-21 16:12:18 +00:00
add vidjoy
This commit is contained in:
parent
e2a4400819
commit
84b7ff6dd5
3 changed files with 58 additions and 0 deletions
|
|
@ -67,6 +67,7 @@ import { slidemoviesScraper } from './sources/slidemovies';
|
||||||
import { soaperTvScraper } from './sources/soapertv';
|
import { soaperTvScraper } from './sources/soapertv';
|
||||||
import { streamboxScraper } from './sources/streambox';
|
import { streamboxScraper } from './sources/streambox';
|
||||||
import { vidapiClickScraper } from './sources/vidapiclick';
|
import { vidapiClickScraper } from './sources/vidapiclick';
|
||||||
|
import { vidjoyScraper } from './sources/vidjoy';
|
||||||
import { warezcdnScraper } from './sources/warezcdn';
|
import { warezcdnScraper } from './sources/warezcdn';
|
||||||
import { wecimaScraper } from './sources/wecima';
|
import { wecimaScraper } from './sources/wecima';
|
||||||
|
|
||||||
|
|
@ -99,6 +100,7 @@ export function gatherAllSources(): Array<Sourcerer> {
|
||||||
wecimaScraper,
|
wecimaScraper,
|
||||||
animeflvScraper,
|
animeflvScraper,
|
||||||
cinemaosScraper,
|
cinemaosScraper,
|
||||||
|
vidjoyScraper,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
54
src/providers/sources/vidjoy.ts
Normal file
54
src/providers/sources/vidjoy.ts
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
/* eslint-disable no-console */
|
||||||
|
import { flags } from '@/entrypoint/utils/targets';
|
||||||
|
import { SourcererOutput, makeSourcerer } from '@/providers/base';
|
||||||
|
import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context';
|
||||||
|
import { NotFoundError } from '@/utils/errors';
|
||||||
|
|
||||||
|
const baseUrl = 'https://mia.vidjoy.wtf';
|
||||||
|
|
||||||
|
async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promise<SourcererOutput> {
|
||||||
|
const apiUrl =
|
||||||
|
ctx.media.type === 'show'
|
||||||
|
? `${baseUrl}/tv/${ctx.media.tmdbId}/${ctx.media.season.number}/${ctx.media.episode.number}/index.m3u8`
|
||||||
|
: `${baseUrl}/movies/${ctx.media.tmdbId}/index.m3u8`;
|
||||||
|
|
||||||
|
const streamRes = await ctx.proxiedFetcher.full(apiUrl, {
|
||||||
|
method: 'GET',
|
||||||
|
readHeaders: ['content-type'],
|
||||||
|
headers: {
|
||||||
|
referer: 'https://spencerdevs.xyz/',
|
||||||
|
origin: 'https://spencerdevs.xyz',
|
||||||
|
'User-Agent':
|
||||||
|
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (streamRes.statusCode !== 200) throw new NotFoundError('Failed to fetch video source');
|
||||||
|
|
||||||
|
ctx.progress(90);
|
||||||
|
|
||||||
|
return {
|
||||||
|
embeds: [],
|
||||||
|
stream: [
|
||||||
|
{
|
||||||
|
id: 'primary',
|
||||||
|
type: 'hls',
|
||||||
|
playlist:
|
||||||
|
ctx.media.type === 'show'
|
||||||
|
? `${baseUrl}/tv/${ctx.media.tmdbId}/${ctx.media.season.number}/${ctx.media.episode.number}/index.m3u8`
|
||||||
|
: `${baseUrl}/movies/${ctx.media.tmdbId}/index.m3u8`,
|
||||||
|
flags: [flags.CORS_ALLOWED],
|
||||||
|
captions: [],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export const vidjoyScraper = makeSourcerer({
|
||||||
|
id: 'vidjoy',
|
||||||
|
name: 'Vidjoy',
|
||||||
|
rank: 185,
|
||||||
|
flags: [flags.CORS_ALLOWED],
|
||||||
|
scrapeMovie: comboScraper,
|
||||||
|
scrapeShow: comboScraper,
|
||||||
|
});
|
||||||
|
|
@ -10,6 +10,7 @@ import { viperScraper } from '@/providers/embeds/viper';
|
||||||
import { warezcdnembedMp4Scraper } from '@/providers/embeds/warezcdn/mp4';
|
import { warezcdnembedMp4Scraper } from '@/providers/embeds/warezcdn/mp4';
|
||||||
import { embedsuScraper } from '@/providers/sources/embedsu';
|
import { embedsuScraper } from '@/providers/sources/embedsu';
|
||||||
import { soaperTvScraper } from '@/providers/sources/soapertv';
|
import { soaperTvScraper } from '@/providers/sources/soapertv';
|
||||||
|
import { vidjoyScraper } from '@/providers/sources/vidjoy';
|
||||||
import { vidsrcScraper } from '@/providers/sources/vidsrc';
|
import { vidsrcScraper } from '@/providers/sources/vidsrc';
|
||||||
import { wecimaScraper } from '@/providers/sources/wecima';
|
import { wecimaScraper } from '@/providers/sources/wecima';
|
||||||
import { Stream } from '@/providers/streams';
|
import { Stream } from '@/providers/streams';
|
||||||
|
|
@ -32,6 +33,7 @@ const SKIP_VALIDATION_CHECK_IDS = [
|
||||||
...cinemaosHexaEmbeds.map((e) => e.id),
|
...cinemaosHexaEmbeds.map((e) => e.id),
|
||||||
soaperTvScraper.id,
|
soaperTvScraper.id,
|
||||||
vidsrcScraper.id,
|
vidsrcScraper.id,
|
||||||
|
vidjoyScraper.id,
|
||||||
];
|
];
|
||||||
|
|
||||||
export function isValidStream(stream: Stream | undefined): boolean {
|
export function isValidStream(stream: Stream | undefined): boolean {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue