use worker proxy

This commit is contained in:
lonelil
2024-04-11 19:23:46 +08:00
parent 1a754ad951
commit c17b74c8ba
2 changed files with 7 additions and 7 deletions

View File

@@ -53,3 +53,5 @@ export async function getDecryptedId(ctx: EmbedScrapeContext) {
return decryptedId; return decryptedId;
} }
export const warezcdnWorkerProxy = 'https://workerproxy.warezcdn.workers.dev';

View File

@@ -2,7 +2,7 @@ import { makeEmbed } from '@/providers/base';
import { EmbedScrapeContext } from '@/utils/context'; import { EmbedScrapeContext } from '@/utils/context';
import { NotFoundError } from '@/utils/errors'; import { NotFoundError } from '@/utils/errors';
import { getDecryptedId } from './common'; import { getDecryptedId, warezcdnWorkerProxy } from './common';
const cdnListing = [50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64]; const cdnListing = [50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64];
@@ -24,7 +24,7 @@ export const warezcdnembedMp4Scraper = makeEmbed({
id: 'warezcdnembedmp4', // WarezCDN is both a source and an embed host id: 'warezcdnembedmp4', // WarezCDN is both a source and an embed host
name: 'WarezCDN MP4', name: 'WarezCDN MP4',
rank: 83, rank: 83,
disabled: true, // crashes movie-web player, disabling for now disabled: false,
async scrape(ctx) { async scrape(ctx) {
const decryptedId = await getDecryptedId(ctx); const decryptedId = await getDecryptedId(ctx);
@@ -42,15 +42,13 @@ export const warezcdnembedMp4Scraper = makeEmbed({
qualities: { qualities: {
unknown: { unknown: {
type: 'mp4', type: 'mp4',
url: `${warezcdnWorkerProxy}/?${new URLSearchParams({
url: streamUrl, url: streamUrl,
})}`,
}, },
}, },
type: 'file', type: 'file',
flags: [], flags: [],
headers: {
Origin: 'https://cloud.mail.ru',
Referer: 'https://cloud.mail.ru/',
},
}, },
], ],
}; };