mirror of
https://github.com/p-stream/providers.git
synced 2026-03-11 17:55:36 +00:00
enable autoembed
This commit is contained in:
parent
f2abd83a5d
commit
4ddcf500f0
1 changed files with 4 additions and 4 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue