mirror of
https://github.com/p-stream/providers.git
synced 2026-04-19 06:32:05 +00:00
Update vidsrcsu with cineby
remove (FlixHQ) tag
This commit is contained in:
parent
b428266cdf
commit
1badace045
3 changed files with 23 additions and 1 deletions
|
|
@ -62,6 +62,7 @@ import { vidplayScraper } from './embeds/vidplay';
|
|||
import {
|
||||
VidsrcsuServer10Scraper,
|
||||
VidsrcsuServer11Scraper,
|
||||
VidsrcsuServer12Scraper,
|
||||
VidsrcsuServer1Scraper,
|
||||
VidsrcsuServer2Scraper,
|
||||
VidsrcsuServer3Scraper,
|
||||
|
|
@ -189,6 +190,7 @@ export function gatherAllEmbeds(): Array<Embed> {
|
|||
VidsrcsuServer9Scraper,
|
||||
VidsrcsuServer10Scraper,
|
||||
VidsrcsuServer11Scraper,
|
||||
VidsrcsuServer12Scraper,
|
||||
webtor4kScraper,
|
||||
webtor1080Scraper,
|
||||
webtor720Scraper,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@ import { flags } from '@/entrypoint/utils/targets';
|
|||
import { makeEmbed } from '@/providers/base';
|
||||
|
||||
const providers = [
|
||||
{
|
||||
id: 'server-12',
|
||||
rank: 112,
|
||||
},
|
||||
{
|
||||
id: 'server-7',
|
||||
rank: 102,
|
||||
|
|
@ -85,4 +89,5 @@ export const [
|
|||
VidsrcsuServer9Scraper,
|
||||
VidsrcsuServer10Scraper,
|
||||
VidsrcsuServer11Scraper,
|
||||
VidsrcsuServer12Scraper,
|
||||
] = providers.map(embed);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable no-console */
|
||||
import { flags } from '@/entrypoint/utils/targets';
|
||||
import { SourcererEmbed, SourcererOutput, makeSourcerer } from '@/providers/base';
|
||||
import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context';
|
||||
|
|
@ -7,12 +8,26 @@ async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promis
|
|||
const embedPage = await ctx.proxiedFetcher(
|
||||
`https://vidsrc.su/embed/${ctx.media.type === 'movie' ? `movie/${ctx.media.tmdbId}` : `tv/${ctx.media.tmdbId}/${ctx.media.season.number}/${ctx.media.episode.number}`}`,
|
||||
);
|
||||
|
||||
const decodedPeterMatch = embedPage.match(/decodeURIComponent\('([^']+)'\)/);
|
||||
const decodedPeterUrl = decodedPeterMatch ? decodeURIComponent(decodedPeterMatch[1]) : null;
|
||||
|
||||
const serverMatches = [...embedPage.matchAll(/label: 'Server (\d+)', url: '(https.*)'/g)];
|
||||
|
||||
const servers = serverMatches.map((match) => ({
|
||||
serverNumber: parseInt(match[1], 10),
|
||||
url: match[2],
|
||||
}));
|
||||
|
||||
if (decodedPeterUrl) {
|
||||
servers.push({
|
||||
serverNumber: 12,
|
||||
url: decodedPeterUrl,
|
||||
});
|
||||
}
|
||||
|
||||
console.log(servers);
|
||||
|
||||
ctx.progress(60);
|
||||
|
||||
if (!servers.length) throw new NotFoundError('No server playlist found');
|
||||
|
|
@ -29,7 +44,7 @@ async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promis
|
|||
}
|
||||
export const vidsrcsuScraper = makeSourcerer({
|
||||
id: 'vidsrcsu',
|
||||
name: 'vidsrc.su (FlixHQ)',
|
||||
name: 'vidsrc.su',
|
||||
rank: 140,
|
||||
flags: [flags.CORS_ALLOWED],
|
||||
scrapeMovie: comboScraper,
|
||||
|
|
|
|||
Loading…
Reference in a new issue