mirror of
https://github.com/p-stream/providers.git
synced 2026-01-11 20:10:33 +00:00
Co-Authored-By: FifthWit <110744759+fifthwit@users.noreply.github.com>
This commit is contained in:
parent
65638095c4
commit
a2e362a8f6
2 changed files with 32 additions and 0 deletions
|
|
@ -86,6 +86,7 @@ import { ridooMoviesScraper } from './sources/ridomovies';
|
|||
import { slidemoviesScraper } from './sources/slidemovies';
|
||||
import { soaperTvScraper } from './sources/soapertv';
|
||||
import { streamboxScraper } from './sources/streambox';
|
||||
import { turbovidSourceScraper } from './sources/turbovid';
|
||||
import { vidapiClickScraper } from './sources/vidapiclick';
|
||||
import { vidifyScraper } from './sources/vidify';
|
||||
import vidnestScraper from './sources/vidnest';
|
||||
|
|
@ -132,6 +133,7 @@ export function gatherAllSources(): Array<Sourcerer> {
|
|||
vidnestScraper,
|
||||
animetsuScraper,
|
||||
lookmovieScraper,
|
||||
turbovidSourceScraper,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
30
src/providers/sources/turbovid.ts
Normal file
30
src/providers/sources/turbovid.ts
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import { flags } from '@/entrypoint/utils/targets';
|
||||
import { SourcererOutput, makeSourcerer } from '@/providers/base';
|
||||
import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context';
|
||||
|
||||
const baseUrl = 'https://turbovid.eu';
|
||||
|
||||
async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promise<SourcererOutput> {
|
||||
const embedUrl =
|
||||
ctx.media.type === 'movie'
|
||||
? `${baseUrl}/api/req/movie/${ctx.media.tmdbId}`
|
||||
: `${baseUrl}/api/req/tv/${ctx.media.tmdbId}/${ctx.media.season.number}/${ctx.media.episode.number}`;
|
||||
return {
|
||||
embeds: [
|
||||
{
|
||||
embedId: 'turbovid',
|
||||
url: embedUrl,
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
export const turbovidSourceScraper = makeSourcerer({
|
||||
id: 'turbovidSource',
|
||||
name: 'TurboVid',
|
||||
rank: 120,
|
||||
disabled: false,
|
||||
flags: [flags.CORS_ALLOWED],
|
||||
scrapeMovie: comboScraper,
|
||||
scrapeShow: comboScraper,
|
||||
});
|
||||
Loading…
Reference in a new issue