mirror of
https://github.com/p-stream/providers.git
synced 2026-05-21 11:32:25 +00:00
add more flicky sources
This commit is contained in:
parent
e4c91400d1
commit
0ac4e1b083
3 changed files with 13 additions and 15 deletions
|
|
@ -27,7 +27,7 @@ import {
|
||||||
} from './embeds/autoembed';
|
} from './embeds/autoembed';
|
||||||
import { cinemaosEmbeds } from './embeds/cinemaos';
|
import { cinemaosEmbeds } from './embeds/cinemaos';
|
||||||
import { closeLoadScraper } from './embeds/closeload';
|
import { closeLoadScraper } from './embeds/closeload';
|
||||||
import { madplayBaseEmbed, madplayNsapiEmbed } from './embeds/madplay';
|
import { madplayBaseEmbed, madplayNsapiEmbed, madplayNsapiVidFastEmbed, madplayRoperEmbed } from './embeds/madplay';
|
||||||
import { mp4hydraServer1Scraper, mp4hydraServer2Scraper } from './embeds/mp4hydra';
|
import { mp4hydraServer1Scraper, mp4hydraServer2Scraper } from './embeds/mp4hydra';
|
||||||
import { ridooScraper } from './embeds/ridoo';
|
import { ridooScraper } from './embeds/ridoo';
|
||||||
import { streamtapeLatinoScraper, streamtapeScraper } from './embeds/streamtape';
|
import { streamtapeLatinoScraper, streamtapeScraper } from './embeds/streamtape';
|
||||||
|
|
@ -164,5 +164,7 @@ export function gatherAllEmbeds(): Array<Embed> {
|
||||||
vidsrcPulsarEmbed,
|
vidsrcPulsarEmbed,
|
||||||
madplayBaseEmbed,
|
madplayBaseEmbed,
|
||||||
madplayNsapiEmbed,
|
madplayNsapiEmbed,
|
||||||
|
madplayRoperEmbed,
|
||||||
|
madplayNsapiVidFastEmbed,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
|
/* eslint-disable no-console */
|
||||||
import { flags } from '@/entrypoint/utils/targets';
|
import { flags } from '@/entrypoint/utils/targets';
|
||||||
import { NotFoundError } from '@/utils/errors';
|
import { NotFoundError } from '@/utils/errors';
|
||||||
import { createM3U8ProxyUrl } from '@/utils/proxy';
|
import { createM3U8ProxyUrl } from '@/utils/proxy';
|
||||||
|
|
@ -16,7 +16,7 @@ const headers = {
|
||||||
export const madplayBaseEmbed = makeEmbed({
|
export const madplayBaseEmbed = makeEmbed({
|
||||||
id: 'madplay-base',
|
id: 'madplay-base',
|
||||||
name: 'Flicky Base',
|
name: 'Flicky Base',
|
||||||
rank: 104,
|
rank: 134,
|
||||||
async scrape(ctx): Promise<EmbedOutput> {
|
async scrape(ctx): Promise<EmbedOutput> {
|
||||||
const query = JSON.parse(ctx.url);
|
const query = JSON.parse(ctx.url);
|
||||||
const { type, tmdbId, season, episode } = query;
|
const { type, tmdbId, season, episode } = query;
|
||||||
|
|
@ -27,11 +27,10 @@ export const madplayBaseEmbed = makeEmbed({
|
||||||
url += `?id=${tmdbId}`;
|
url += `?id=${tmdbId}`;
|
||||||
} else if (type === 'show') {
|
} else if (type === 'show') {
|
||||||
url += `?id=${tmdbId}&season=${season.number}&episode=${episode.number}`;
|
url += `?id=${tmdbId}&season=${season.number}&episode=${episode.number}`;
|
||||||
} else {
|
|
||||||
throw new NotFoundError('Unsupported media type');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await ctx.proxiedFetcher(url, { headers });
|
const res = await ctx.proxiedFetcher(url, { headers });
|
||||||
|
console.log(res);
|
||||||
|
|
||||||
if (!Array.isArray(res) || res.length === 0) {
|
if (!Array.isArray(res) || res.length === 0) {
|
||||||
throw new NotFoundError('No streams found');
|
throw new NotFoundError('No streams found');
|
||||||
|
|
@ -61,7 +60,7 @@ export const madplayBaseEmbed = makeEmbed({
|
||||||
export const madplayNsapiEmbed = makeEmbed({
|
export const madplayNsapiEmbed = makeEmbed({
|
||||||
id: 'madplay-nsapi',
|
id: 'madplay-nsapi',
|
||||||
name: 'Flicky Northstar',
|
name: 'Flicky Northstar',
|
||||||
rank: 103,
|
rank: 133,
|
||||||
async scrape(ctx): Promise<EmbedOutput> {
|
async scrape(ctx): Promise<EmbedOutput> {
|
||||||
const query = JSON.parse(ctx.url);
|
const query = JSON.parse(ctx.url);
|
||||||
const { type, tmdbId, season, episode } = query;
|
const { type, tmdbId, season, episode } = query;
|
||||||
|
|
@ -72,11 +71,10 @@ export const madplayNsapiEmbed = makeEmbed({
|
||||||
url += `?id=${tmdbId}`;
|
url += `?id=${tmdbId}`;
|
||||||
} else if (type === 'show') {
|
} else if (type === 'show') {
|
||||||
url += `?id=${tmdbId}&season=${season.number}&episode=${episode.number}`;
|
url += `?id=${tmdbId}&season=${season.number}&episode=${episode.number}`;
|
||||||
} else {
|
|
||||||
throw new NotFoundError('Unsupported media type');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await ctx.proxiedFetcher(url, { headers });
|
const res = await ctx.proxiedFetcher(url, { headers });
|
||||||
|
console.log(res);
|
||||||
|
|
||||||
if (!Array.isArray(res) || res.length === 0) {
|
if (!Array.isArray(res) || res.length === 0) {
|
||||||
throw new NotFoundError('No streams found');
|
throw new NotFoundError('No streams found');
|
||||||
|
|
@ -106,7 +104,7 @@ export const madplayNsapiEmbed = makeEmbed({
|
||||||
export const madplayRoperEmbed = makeEmbed({
|
export const madplayRoperEmbed = makeEmbed({
|
||||||
id: 'madplay-roper',
|
id: 'madplay-roper',
|
||||||
name: 'Flicky Roper',
|
name: 'Flicky Roper',
|
||||||
rank: 102,
|
rank: 132,
|
||||||
async scrape(ctx): Promise<EmbedOutput> {
|
async scrape(ctx): Promise<EmbedOutput> {
|
||||||
const query = JSON.parse(ctx.url);
|
const query = JSON.parse(ctx.url);
|
||||||
const { type, tmdbId, season, episode } = query;
|
const { type, tmdbId, season, episode } = query;
|
||||||
|
|
@ -117,11 +115,10 @@ export const madplayRoperEmbed = makeEmbed({
|
||||||
url += `?id=${tmdbId}&type=movie`;
|
url += `?id=${tmdbId}&type=movie`;
|
||||||
} else if (type === 'show') {
|
} else if (type === 'show') {
|
||||||
url += `?id=${tmdbId}&season=${season.number}&episode=${episode.number}&type=series`;
|
url += `?id=${tmdbId}&season=${season.number}&episode=${episode.number}&type=series`;
|
||||||
} else {
|
|
||||||
throw new NotFoundError('Unsupported media type');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await ctx.proxiedFetcher(url, { headers });
|
const res = await ctx.proxiedFetcher(url, { headers });
|
||||||
|
console.log(res);
|
||||||
|
|
||||||
if (!Array.isArray(res) || res.length === 0) {
|
if (!Array.isArray(res) || res.length === 0) {
|
||||||
throw new NotFoundError('No streams found');
|
throw new NotFoundError('No streams found');
|
||||||
|
|
@ -151,7 +148,7 @@ export const madplayRoperEmbed = makeEmbed({
|
||||||
export const madplayNsapiVidFastEmbed = makeEmbed({
|
export const madplayNsapiVidFastEmbed = makeEmbed({
|
||||||
id: 'madplay-vidfast',
|
id: 'madplay-vidfast',
|
||||||
name: 'Flicky Vidfast',
|
name: 'Flicky Vidfast',
|
||||||
rank: 101,
|
rank: 131,
|
||||||
async scrape(ctx): Promise<EmbedOutput> {
|
async scrape(ctx): Promise<EmbedOutput> {
|
||||||
const query = JSON.parse(ctx.url);
|
const query = JSON.parse(ctx.url);
|
||||||
const { type, tmdbId, season, episode } = query;
|
const { type, tmdbId, season, episode } = query;
|
||||||
|
|
@ -162,11 +159,10 @@ export const madplayNsapiVidFastEmbed = makeEmbed({
|
||||||
url += `/movie/${tmdbId}`;
|
url += `/movie/${tmdbId}`;
|
||||||
} else if (type === 'show') {
|
} else if (type === 'show') {
|
||||||
url += `/tv/${tmdbId}/${season.number}/${episode.number}`;
|
url += `/tv/${tmdbId}/${season.number}/${episode.number}`;
|
||||||
} else {
|
|
||||||
throw new NotFoundError('Unsupported media type');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await ctx.proxiedFetcher(url, { headers });
|
const res = await ctx.proxiedFetcher(url, { headers });
|
||||||
|
console.log(res);
|
||||||
|
|
||||||
if (!Array.isArray(res) || res.length === 0) {
|
if (!Array.isArray(res) || res.length === 0) {
|
||||||
throw new NotFoundError('No streams found');
|
throw new NotFoundError('No streams found');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue