mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 13:43:25 +00:00
complete requested changes
This commit is contained in:
@@ -23,7 +23,7 @@ function decrypt(input: string) {
|
||||
}
|
||||
|
||||
export async function getDecryptedId(ctx: EmbedScrapeContext) {
|
||||
const page = await ctx.proxiedFetcher<string>(`/player.php?${new URLSearchParams({ id: ctx.url })}`, {
|
||||
const page = await ctx.proxiedFetcher<string>(`/player.php`, {
|
||||
baseUrl: warezcdnPlayerBase,
|
||||
headers: {
|
||||
Referer: `${warezcdnPlayerBase}/getEmbed.php?${new URLSearchParams({
|
||||
@@ -31,6 +31,9 @@ export async function getDecryptedId(ctx: EmbedScrapeContext) {
|
||||
sv: 'warezcdn',
|
||||
})}`,
|
||||
},
|
||||
query: {
|
||||
id: ctx.url,
|
||||
},
|
||||
});
|
||||
const allowanceKey = page.match(/let allowanceKey = "(.*?)";/)?.[1];
|
||||
if (!allowanceKey) throw new NotFoundError('Failed to get allowanceKey');
|
||||
@@ -53,5 +56,3 @@ export async function getDecryptedId(ctx: EmbedScrapeContext) {
|
||||
|
||||
return decryptedId;
|
||||
}
|
||||
|
||||
export const warezcdnWorkerProxy = 'https://workerproxy.warezcdn.workers.dev';
|
||||
|
@@ -1,8 +1,9 @@
|
||||
import { makeEmbed } from '@/providers/base';
|
||||
import { warezcdnWorkerProxy } from '@/providers/sources/warezcdn/common';
|
||||
import { EmbedScrapeContext } from '@/utils/context';
|
||||
import { NotFoundError } from '@/utils/errors';
|
||||
|
||||
import { getDecryptedId, warezcdnWorkerProxy } from './common';
|
||||
import { getDecryptedId } from './common';
|
||||
|
||||
const cdnListing = [50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64];
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
export const warezcdnBase = 'https://embed.warezcdn.com';
|
||||
export const warezcdnApiBase = 'https://warezcdn.com/embed';
|
||||
export const warezcdnPlayerBase = 'https://warezcdn.com/player';
|
||||
export const warezcdnWorkerProxy = 'https://workerproxy.warezcdn.workers.dev';
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { load } from 'cheerio';
|
||||
|
||||
import { SourcererEmbed, SourcererOutput, makeSourcerer } from '@/providers/base';
|
||||
import { SourcererEmbed, makeSourcerer } from '@/providers/base';
|
||||
import { mixdropScraper } from '@/providers/embeds/mixdrop';
|
||||
import { warezcdnembedHlsScraper } from '@/providers/embeds/warezcdn/hls';
|
||||
import { warezcdnembedMp4Scraper } from '@/providers/embeds/warezcdn/mp4';
|
||||
@@ -30,15 +30,16 @@ const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) =>
|
||||
const embedUrl = $(element).attr('data-load-embed')!;
|
||||
|
||||
if (embedHost === 'mixdrop') {
|
||||
const params = new URLSearchParams({
|
||||
const params = {
|
||||
id: embedUrl,
|
||||
sv: 'mixdrop',
|
||||
});
|
||||
const realUrl = await ctx.proxiedFetcher<string>(`/getPlay.php?${params}`, {
|
||||
};
|
||||
const realUrl = await ctx.proxiedFetcher<string>(`/getPlay.php`, {
|
||||
baseUrl: warezcdnApiBase,
|
||||
headers: {
|
||||
Referer: `${warezcdnApiBase}/getEmbed.php?${params}`,
|
||||
Referer: `${warezcdnApiBase}/getEmbed.php?${new URLSearchParams(params)}`,
|
||||
},
|
||||
query: params,
|
||||
});
|
||||
|
||||
const realEmbedUrl = realUrl.match(/window\.location\.href="([^"]*)";/);
|
||||
@@ -63,7 +64,7 @@ const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) =>
|
||||
|
||||
return {
|
||||
embeds,
|
||||
} as SourcererOutput;
|
||||
};
|
||||
};
|
||||
|
||||
export const warezcdnScraper = makeSourcerer({
|
||||
|
Reference in New Issue
Block a user