mirror of
https://github.com/sussy-code/providers.git
synced 2026-08-12 18:26:12 +00:00
add uira.live
This commit is contained in:
parent
b5886ca6f0
commit
75379be76c
3 changed files with 164 additions and 0 deletions
|
|
@ -57,6 +57,18 @@ import { smashyStreamOScraper } from './embeds/smashystream/opstream';
|
|||
import { smashyStreamFScraper } from './embeds/smashystream/video1';
|
||||
import { streamtapeScraper } from './embeds/streamtape';
|
||||
import { streamvidScraper } from './embeds/streamvid';
|
||||
import {
|
||||
uiraFlixhqScraper,
|
||||
uiraGhostScraper,
|
||||
uiraGuruScraper,
|
||||
uiraHydraxScraper,
|
||||
uiraMegaScraper,
|
||||
uiraNinjaScraper,
|
||||
uiraOrionScraper,
|
||||
uiraRabbitScraper,
|
||||
uiraVidapiScraper,
|
||||
uiraVidsrcvipScraper,
|
||||
} from './embeds/uiralive';
|
||||
import { vidCloudScraper } from './embeds/vidcloud';
|
||||
import { vidplayScraper } from './embeds/vidplay';
|
||||
import {
|
||||
|
|
@ -95,6 +107,7 @@ import { ridooMoviesScraper } from './sources/ridomovies';
|
|||
import { slidemoviesScraper } from './sources/slidemovies';
|
||||
import { smashyStreamScraper } from './sources/smashystream';
|
||||
import { soaperTvScraper } from './sources/soapertv';
|
||||
import { uiraliveScraper } from './sources/uiralive';
|
||||
import { vidlinkScraper } from './sources/vidlink';
|
||||
import { vidSrcToScraper } from './sources/vidsrcto';
|
||||
import { warezcdnScraper } from './sources/warezcdn';
|
||||
|
|
@ -142,6 +155,7 @@ export function gatherAllSources(): Array<Sourcerer> {
|
|||
slidemoviesScraper,
|
||||
iosmirrorScraper,
|
||||
iosmirrorPVScraper,
|
||||
uiraliveScraper,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -211,5 +225,15 @@ export function gatherAllEmbeds(): Array<Embed> {
|
|||
webtor720Scraper,
|
||||
webtor480Scraper,
|
||||
viperScraper,
|
||||
uiraMegaScraper,
|
||||
uiraOrionScraper,
|
||||
uiraRabbitScraper,
|
||||
uiraNinjaScraper,
|
||||
uiraGuruScraper,
|
||||
uiraVidsrcvipScraper,
|
||||
uiraVidapiScraper,
|
||||
uiraFlixhqScraper,
|
||||
uiraGhostScraper,
|
||||
uiraHydraxScraper,
|
||||
];
|
||||
}
|
||||
|
|
|
|||
101
src/providers/embeds/uiralive.ts
Normal file
101
src/providers/embeds/uiralive.ts
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
import { flags } from '@/entrypoint/utils/targets';
|
||||
import { makeEmbed } from '@/providers/base';
|
||||
|
||||
const providers = [
|
||||
{
|
||||
id: 'uira-mega',
|
||||
rank: 310,
|
||||
},
|
||||
{
|
||||
id: 'uira-orion',
|
||||
rank: 309,
|
||||
},
|
||||
{
|
||||
id: 'uira-rabbit',
|
||||
rank: 308,
|
||||
},
|
||||
{
|
||||
id: 'uira-ninja',
|
||||
rank: 307,
|
||||
},
|
||||
{
|
||||
id: 'uira-guru',
|
||||
rank: 306,
|
||||
},
|
||||
{
|
||||
id: 'uira-vidsrcvip',
|
||||
rank: 305,
|
||||
},
|
||||
{
|
||||
id: 'uira-vidapi',
|
||||
rank: 304,
|
||||
},
|
||||
{
|
||||
id: 'uira-flixhq',
|
||||
rank: 303,
|
||||
},
|
||||
{
|
||||
id: 'uira-ghost',
|
||||
rank: 302,
|
||||
},
|
||||
{
|
||||
id: 'uira-hydrax',
|
||||
rank: 301,
|
||||
},
|
||||
{
|
||||
id: 'uira-g1',
|
||||
rank: 300,
|
||||
},
|
||||
{
|
||||
id: 'uira-g2',
|
||||
rank: 299,
|
||||
},
|
||||
{
|
||||
id: 'uira-soapertv',
|
||||
rank: 298,
|
||||
},
|
||||
{
|
||||
id: 'uira-flicky',
|
||||
rank: 297,
|
||||
},
|
||||
];
|
||||
|
||||
function embed(provider: { id: string; rank: number; name?: string; disabled?: boolean }) {
|
||||
return makeEmbed({
|
||||
id: provider.id,
|
||||
name:
|
||||
provider.name ||
|
||||
provider.id
|
||||
.split('-')
|
||||
.map((word) => word[0].toUpperCase() + word.slice(1))
|
||||
.join(' '),
|
||||
disabled: provider.disabled,
|
||||
rank: provider.rank,
|
||||
async scrape(ctx) {
|
||||
return {
|
||||
stream: [
|
||||
{
|
||||
id: 'primary',
|
||||
type: 'hls',
|
||||
playlist: ctx.url,
|
||||
flags: [flags.CORS_ALLOWED],
|
||||
captions: [],
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export const [
|
||||
uiraMegaScraper,
|
||||
uiraOrionScraper,
|
||||
uiraRabbitScraper,
|
||||
uiraNinjaScraper,
|
||||
uiraGuruScraper,
|
||||
uiraVidsrcvipScraper,
|
||||
uiraVidapiScraper,
|
||||
uiraFlixhqScraper,
|
||||
uiraGhostScraper,
|
||||
uiraHydraxScraper,
|
||||
] = providers.map(embed);
|
||||
39
src/providers/sources/uiralive.ts
Normal file
39
src/providers/sources/uiralive.ts
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
import { flags } from '@/entrypoint/utils/targets';
|
||||
import { SourcererEmbed, SourcererOutput, makeSourcerer } from '@/providers/base';
|
||||
import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context';
|
||||
import { NotFoundError } from '@/utils/errors';
|
||||
|
||||
const baseUrl = 'https://xj4h5qk3tf7v2mlr9s.uira.live/';
|
||||
|
||||
async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promise<SourcererOutput> {
|
||||
const result = await ctx.fetcher(
|
||||
`${baseUrl}all/${ctx.media.tmdbId}${
|
||||
ctx.media.type === 'movie' ? '' : `?s=${ctx.media.season.number}&e=${ctx.media.episode.number}`
|
||||
}`,
|
||||
);
|
||||
|
||||
if (!result?.sources?.length) {
|
||||
throw new NotFoundError('No sources found');
|
||||
}
|
||||
|
||||
const embeds: SourcererEmbed[] = result.sources.map((source: { source: any; url: any }) => ({
|
||||
embedId: `uira-${source.source}`,
|
||||
url: source.url,
|
||||
}));
|
||||
|
||||
ctx.progress(90);
|
||||
|
||||
return {
|
||||
embeds,
|
||||
};
|
||||
}
|
||||
|
||||
export const uiraliveScraper = makeSourcerer({
|
||||
id: 'uiralive',
|
||||
name: 'uira.live',
|
||||
rank: 155,
|
||||
disabled: false,
|
||||
flags: [flags.CORS_ALLOWED],
|
||||
scrapeMovie: comboScraper,
|
||||
scrapeShow: comboScraper,
|
||||
});
|
||||
Loading…
Reference in a new issue