update flicky with other server

This commit is contained in:
Pas 2025-08-05 11:00:44 -06:00
parent cfe3950d8b
commit 209f32faac
4 changed files with 195 additions and 64 deletions

View file

@ -27,6 +27,7 @@ import {
} from './embeds/autoembed';
import { cinemaosEmbeds } from './embeds/cinemaos';
import { closeLoadScraper } from './embeds/closeload';
import { madplayBaseEmbed, madplayNsapiEmbed } from './embeds/madplay';
import { mp4hydraServer1Scraper, mp4hydraServer2Scraper } from './embeds/mp4hydra';
import { ridooScraper } from './embeds/ridoo';
import { streamtapeLatinoScraper, streamtapeScraper } from './embeds/streamtape';
@ -63,10 +64,10 @@ import { cinemaosScraper } from './sources/cinemaos';
import { coitusScraper } from './sources/coitus';
import { cuevana3Scraper } from './sources/cuevana3';
import { embedsuScraper } from './sources/embedsu';
import { flickyScraper } from './sources/flicky';
import { hdRezkaScraper } from './sources/hdrezka';
import { iosmirrorScraper } from './sources/iosmirror';
import { iosmirrorPVScraper } from './sources/iosmirrorpv';
import { madplayScraper } from './sources/madplay';
import { nunflixScraper } from './sources/nunflix';
import { ridooMoviesScraper } from './sources/ridomovies';
import { slidemoviesScraper } from './sources/slidemovies';
@ -111,7 +112,7 @@ export function gatherAllSources(): Array<Sourcerer> {
pirxcyScraper,
vidsrcvipScraper,
vidsrccxScraper,
flickyScraper,
madplayScraper,
];
}
@ -161,5 +162,7 @@ export function gatherAllEmbeds(): Array<Embed> {
vidsrcNovaEmbed,
vidsrcCometEmbed,
vidsrcPulsarEmbed,
madplayBaseEmbed,
madplayNsapiEmbed,
];
}

View file

@ -0,0 +1,151 @@
import { flags } from '@/entrypoint/utils/targets';
import { NotFoundError } from '@/utils/errors';
import { createM3U8ProxyUrl } from '@/utils/proxy';
import { EmbedOutput, makeEmbed } from '../base';
const baseUrl = 'madplay.site';
const headers = {
referer: 'https://madplay.site/',
origin: 'https://madplay.site',
'User-Agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
};
export const madplayBaseEmbed = makeEmbed({
id: 'madplay-base',
name: 'Flicky Base',
rank: 104,
async scrape(ctx): Promise<EmbedOutput> {
const query = JSON.parse(ctx.url);
const { type, tmdbId, season, episode } = query;
let url = `https://${baseUrl}/api/playsrc`;
if (type === 'movie') {
url += `?id=${tmdbId}`;
} else if (type === 'show') {
url += `?id=${tmdbId}&season=${season.number}&episode=${episode.number}`;
} else {
throw new NotFoundError('Unsupported media type');
}
const res = await ctx.proxiedFetcher(url, { headers });
if (!Array.isArray(res) || res.length === 0) {
throw new NotFoundError('No streams found');
}
const stream = res[0];
if (!stream.file) {
throw new NotFoundError('No file URL found in stream');
}
ctx.progress(100);
return {
stream: [
{
id: 'primary',
type: 'hls',
playlist: createM3U8ProxyUrl(stream.file, headers),
flags: [flags.CORS_ALLOWED],
captions: [],
},
],
};
},
});
export const madplayNsapiEmbed = makeEmbed({
id: 'madplay-nsapi',
name: 'Flicky Northstar',
rank: 103,
async scrape(ctx): Promise<EmbedOutput> {
const query = JSON.parse(ctx.url);
const { type, tmdbId, season, episode } = query;
let url = `https://${baseUrl}/api/nsapi/vid`;
if (type === 'movie') {
url += `?id=${tmdbId}`;
} else if (type === 'show') {
url += `?id=${tmdbId}&season=${season.number}&episode=${episode.number}`;
} else {
throw new NotFoundError('Unsupported media type');
}
const res = await ctx.proxiedFetcher(url, { headers });
if (!Array.isArray(res) || res.length === 0) {
throw new NotFoundError('No streams found');
}
const stream = res[0];
if (!stream.url) {
throw new NotFoundError('No file URL found in stream');
}
ctx.progress(100);
return {
stream: [
{
id: 'primary',
type: 'hls',
playlist: createM3U8ProxyUrl(stream.url, stream.headers || headers),
flags: [flags.CORS_ALLOWED],
captions: [],
},
],
};
},
});
// Will show error: { error: 'Streamkey not found' }
// export const madplayHollyEmbed = makeEmbed({
// id: 'madplay-holly',
// name: 'Flicky Woods',
// rank: 102,
// async scrape(ctx): Promise<EmbedOutput> {
// const query = JSON.parse(ctx.url);
// const { type, tmdbId, season, episode } = query;
// let url = `https://${baseUrl}/api/holly`;
// if (type === 'movie') {
// url += `?id=${tmdbId}&token=direct`;
// } else if (type === 'show') {
// url += `?id=${tmdbId}&s=${season.number}&e=${episode.number}&token=direct`;
// } else {
// throw new NotFoundError('Unsupported media type');
// }
// const res = await ctx.proxiedFetcher(url, { headers });
// console.log(res);
// if (!Array.isArray(res) || res.length === 0) {
// throw new NotFoundError('No streams found');
// }
// const stream = res[0];
// if (!stream.url) {
// throw new NotFoundError('No file URL found in stream');
// }
// ctx.progress(100);
// return {
// stream: [
// {
// id: 'primary',
// type: 'hls',
// playlist: createM3U8ProxyUrl(stream.url, stream.headers || headers),
// flags: [flags.CORS_ALLOWED],
// captions: [],
// },
// ],
// };
// },
// });

View file

@ -1,62 +0,0 @@
import { flags } from '@/entrypoint/utils/targets';
import { SourcererOutput, makeSourcerer } from '@/providers/base';
import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context';
import { NotFoundError } from '@/utils/errors';
import { createM3U8ProxyUrl } from '@/utils/proxy';
const baseUrl = 'madplay.site';
const headers = {
referer: 'https://madplay.site/',
origin: 'https://madplay.site',
'User-Agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
};
async function comboScraper(ctx: MovieScrapeContext | ShowScrapeContext): Promise<SourcererOutput> {
const { media } = ctx;
let url = `https://${baseUrl}/api/playsrc`;
if (media.type === 'movie') {
url += `?id=${media.tmdbId}`;
} else if (media.type === 'show') {
const { tmdbId, season, episode } = media;
url += `?id=${tmdbId}&season=${season.number}&episode=${episode.number}`;
} else {
throw new NotFoundError('Unsupported media type');
}
const res = await ctx.proxiedFetcher(url, { headers });
if (!Array.isArray(res) || res.length === 0) {
throw new NotFoundError('No streams found');
}
const stream = res[0];
if (!stream.file) {
throw new NotFoundError('No file URL found in stream');
}
ctx.progress(100);
return {
stream: [
{
id: 'primary',
type: 'hls',
playlist: createM3U8ProxyUrl(stream.file, headers),
flags: [flags.CORS_ALLOWED],
captions: [],
},
],
embeds: [],
};
}
export const flickyScraper = makeSourcerer({
id: 'flicky',
name: 'Flicky',
rank: 155,
flags: [flags.CORS_ALLOWED],
scrapeMovie: comboScraper,
scrapeShow: comboScraper,
});

View file

@ -0,0 +1,39 @@
import { flags } from '@/entrypoint/utils/targets';
import { SourcererOutput, makeSourcerer } from '@/providers/base';
import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context';
async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promise<SourcererOutput> {
const query = {
type: ctx.media.type,
title: ctx.media.title,
tmdbId: ctx.media.tmdbId,
imdbId: ctx.media.imdbId,
...(ctx.media.type === 'show' && {
season: ctx.media.season.number,
episode: ctx.media.episode.number,
}),
releaseYear: ctx.media.releaseYear,
};
const embeds = [
{
embedId: 'madplay-base',
url: JSON.stringify(query),
},
{
embedId: 'madplay-nsapi',
url: JSON.stringify(query),
},
];
return { embeds };
}
export const madplayScraper = makeSourcerer({
id: 'madplay',
name: 'Flicky',
rank: 155,
flags: [flags.CORS_ALLOWED],
scrapeMovie: comboScraper,
scrapeShow: comboScraper,
});