enable autoembed

This commit is contained in:
Pas 2025-05-04 11:59:12 -06:00
parent f2abd83a5d
commit 4ddcf500f0

View file

@ -5,6 +5,7 @@ import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context';
import { NotFoundError } from '@/utils/errors';
const apiUrl = 'https://tom.autoembed.cc';
// const baseUrl = 'https://watch.autoembed.cc';
async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promise<SourcererOutput> {
const mediaType = ctx.media.type === 'show' ? 'tv' : 'movie';
@ -22,11 +23,10 @@ async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promis
},
headers: {
Referer: apiUrl,
Origin: apiUrl,
},
});
console.log(data);
if (!data) throw new NotFoundError('Failed to fetch video source');
if (!data.videoSource) throw new NotFoundError('No video source found');
ctx.progress(50);
@ -48,8 +48,8 @@ async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promis
export const autoembedScraper = makeSourcerer({
id: 'autoembed',
name: 'Autoembed',
rank: 90,
disabled: true,
rank: 119,
disabled: false,
flags: [flags.CORS_ALLOWED],
scrapeMovie: comboScraper,
scrapeShow: comboScraper,