Merge branch 'dev' into fix-goojara

This commit is contained in:
MemeCornucopia
2024-02-17 11:41:50 -05:00
committed by GitHub
9 changed files with 29 additions and 8 deletions

View File

@@ -43,7 +43,7 @@ export const closeLoadScraper = makeEmbed({
const evalCode = iframeRes$('script')
.filter((_, el) => {
const script = iframeRes$(el);
return (script.attr('type') === 'text/javascript' && script.html()?.includes('eval')) ?? false;
return (script.attr('type') === 'text/javascript' && script.html()?.includes('p,a,c,k,e,d')) ?? false;
})
.html();
if (!evalCode) throw new Error("Couldn't find eval code");

View File

@@ -9,8 +9,12 @@ export const referer = `${vidplayBase}/`;
// Full credits to @Ciarands!
export const getDecryptionKeys = async (ctx: EmbedScrapeContext): Promise<string[]> => {
const res = await ctx.fetcher<string>('https://raw.githubusercontent.com/Ciarands/vidsrc-keys/main/keys.json');
return JSON.parse(res);
const res = await ctx.proxiedFetcher<string>('https://github.com/Ciarands/vidsrc-keys/blob/main/keys.json');
const regex = /"rawLines":\s*\[([\s\S]*?)\]/;
const rawLines = res.match(regex)?.[1];
if (!rawLines) throw new Error('No keys found');
const keys = JSON.parse(`${rawLines.substring(1).replace(/\\"/g, '"')}]`);
return keys;
};
export const getEncodedId = async (ctx: EmbedScrapeContext) => {

View File

@@ -32,6 +32,7 @@ async function universalScraper(ctx: MovieScrapeContext | ShowScrapeContext): Pr
export const lookmovieScraper = makeSourcerer({
id: 'lookmovie',
name: 'LookMovie',
disabled: true,
rank: 700,
flags: [flags.IP_LOCKED],
scrapeShow: universalScraper,

View File

@@ -41,7 +41,7 @@ async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promis
export const showboxScraper = makeSourcerer({
id: 'showbox',
name: 'Showbox',
rank: 300,
rank: 400,
flags: [flags.CORS_ALLOWED, flags.CF_BLOCKED],
scrapeShow: comboScraper,
scrapeMovie: comboScraper,

View File

@@ -83,5 +83,5 @@ export const vidSrcToScraper = makeSourcerer({
scrapeMovie: universalScraper,
scrapeShow: universalScraper,
flags: [],
rank: 400,
rank: 300,
});

View File

@@ -8,10 +8,16 @@ export type StreamFile = {
export type Qualities = 'unknown' | '360' | '480' | '720' | '1080' | '4k';
type ThumbnailTrack = {
type: 'vtt';
url: string;
};
type StreamCommon = {
id: string; // only unique per output
flags: Flags[];
captions: Caption[];
thumbnailTrack?: ThumbnailTrack;
headers?: Record<string, string>; // these headers HAVE to be set to watch the stream
preferredHeaders?: Record<string, string>; // these headers are optional, would improve the stream
};