mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 10:43:25 +00:00
Merge branch 'dev' into provider-tests
This commit is contained in:
@@ -5,6 +5,10 @@ export const flags = {
|
||||
// the stream is locked on IP, so only works if
|
||||
// request maker is same as player (not compatible with proxies)
|
||||
IP_LOCKED: 'ip-locked',
|
||||
|
||||
// The source/embed is blocking cloudflare ip's
|
||||
// This flag is not compatible with a proxy hosted on cloudflare
|
||||
CF_BLOCKED: 'cf-blocked',
|
||||
} as const;
|
||||
|
||||
export type Flags = (typeof flags)[keyof typeof flags];
|
||||
|
@@ -4,6 +4,9 @@ import { flags } from '@/entrypoint/utils/targets';
|
||||
import { makeEmbed } from '@/providers/base';
|
||||
import { Caption, getCaptionTypeFromUrl, labelToLanguageCode } from '@/providers/captions';
|
||||
|
||||
const origin = 'https://rabbitstream.net';
|
||||
const referer = 'https://rabbitstream.net/';
|
||||
|
||||
const { AES, enc } = crypto;
|
||||
|
||||
interface StreamRes {
|
||||
@@ -126,6 +129,10 @@ export const upcloudScraper = makeEmbed({
|
||||
playlist: sources.file,
|
||||
flags: [flags.CORS_ALLOWED],
|
||||
captions,
|
||||
preferredHeaders: {
|
||||
Referer: referer,
|
||||
Origin: origin,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@@ -3,6 +3,7 @@ import { decodeData } from '@/providers/sources/vidsrcto/common';
|
||||
import { EmbedScrapeContext } from '@/utils/context';
|
||||
|
||||
export const vidplayBase = 'https://vidplay.site';
|
||||
export const referer = 'https://vidplay.online/';
|
||||
|
||||
// This file is based on https://github.com/Ciarands/vidsrc-to-resolver/blob/dffa45e726a4b944cb9af0c9e7630476c93c0213/vidsrc.py#L16
|
||||
// Full credits to @Ciarands!
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { makeEmbed } from '@/providers/base';
|
||||
import { Caption, getCaptionTypeFromUrl, labelToLanguageCode } from '@/providers/captions';
|
||||
|
||||
import { getFileUrl } from './common';
|
||||
import { getFileUrl, referer } from './common';
|
||||
import { SubtitleResult, VidplaySourceResponse } from './types';
|
||||
|
||||
export const vidplayScraper = makeEmbed({
|
||||
@@ -46,6 +46,10 @@ export const vidplayScraper = makeEmbed({
|
||||
playlist: source,
|
||||
flags: [],
|
||||
captions,
|
||||
preferredHeaders: {
|
||||
Referer: referer,
|
||||
Origin: referer,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@@ -4,6 +4,9 @@ import { NotFoundError } from '@/utils/errors';
|
||||
|
||||
const remotestreamBase = atob('aHR0cHM6Ly9mc2IuOG1ldDNkdGpmcmNxY2hjb25xcGtsd3hzeGIyb2N1bWMuc3RyZWFt');
|
||||
|
||||
const origin = 'https://remotestre.am';
|
||||
const referer = 'https://remotestre.am/';
|
||||
|
||||
export const remotestreamScraper = makeSourcerer({
|
||||
id: 'remotestream',
|
||||
name: 'Remote Stream',
|
||||
@@ -16,9 +19,12 @@ export const remotestreamScraper = makeSourcerer({
|
||||
const playlistLink = `${remotestreamBase}/Shows/${ctx.media.tmdbId}/${seasonNumber}/${episodeNumber}/${episodeNumber}.m3u8`;
|
||||
|
||||
ctx.progress(30);
|
||||
const streamRes = await ctx.fetcher.full(playlistLink, {
|
||||
method: 'HEAD',
|
||||
const streamRes = await ctx.proxiedFetcher.full(playlistLink, {
|
||||
method: 'GET',
|
||||
readHeaders: ['content-type'],
|
||||
headers: {
|
||||
Referer: referer,
|
||||
},
|
||||
});
|
||||
if (!streamRes.headers.get('content-type')?.toLowerCase().includes('application/x-mpegurl'))
|
||||
throw new NotFoundError('No watchable item found');
|
||||
@@ -33,6 +39,10 @@ export const remotestreamScraper = makeSourcerer({
|
||||
playlist: playlistLink,
|
||||
type: 'hls',
|
||||
flags: [flags.CORS_ALLOWED],
|
||||
preferredHeaders: {
|
||||
Referer: referer,
|
||||
Origin: origin,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -41,9 +51,12 @@ export const remotestreamScraper = makeSourcerer({
|
||||
const playlistLink = `${remotestreamBase}/Movies/${ctx.media.tmdbId}/${ctx.media.tmdbId}.m3u8`;
|
||||
|
||||
ctx.progress(30);
|
||||
const streamRes = await ctx.fetcher.full(playlistLink, {
|
||||
method: 'HEAD',
|
||||
const streamRes = await ctx.proxiedFetcher.full(playlistLink, {
|
||||
method: 'GET',
|
||||
readHeaders: ['content-type'],
|
||||
headers: {
|
||||
Referer: referer,
|
||||
},
|
||||
});
|
||||
if (!streamRes.headers.get('content-type')?.toLowerCase().includes('application/x-mpegurl'))
|
||||
throw new NotFoundError('No watchable item found');
|
||||
@@ -58,6 +71,10 @@ export const remotestreamScraper = makeSourcerer({
|
||||
playlist: playlistLink,
|
||||
type: 'hls',
|
||||
flags: [flags.CORS_ALLOWED],
|
||||
preferredHeaders: {
|
||||
Referer: referer,
|
||||
Origin: origin,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@@ -42,7 +42,7 @@ export const showboxScraper = makeSourcerer({
|
||||
id: 'showbox',
|
||||
name: 'Showbox',
|
||||
rank: 300,
|
||||
flags: [flags.CORS_ALLOWED],
|
||||
flags: [flags.CORS_ALLOWED, flags.CF_BLOCKED],
|
||||
scrapeShow: comboScraper,
|
||||
scrapeMovie: comboScraper,
|
||||
});
|
||||
|
Reference in New Issue
Block a user