1 Commits

Author SHA1 Message Date
Mohit
0e89eb52ed Merge 8a3b65c9dc into 39ce1023c2 2024-04-16 23:30:51 +02:00
4 changed files with 5 additions and 50 deletions

View File

@@ -26,7 +26,6 @@ import { zoechipScraper } from '@/providers/sources/zoechip';
import { bflixScraper } from './embeds/bflix'; import { bflixScraper } from './embeds/bflix';
import { closeLoadScraper } from './embeds/closeload'; import { closeLoadScraper } from './embeds/closeload';
import { fileMoonScraper } from './embeds/filemoon'; import { fileMoonScraper } from './embeds/filemoon';
import { fileMoonMp4Scraper } from './embeds/filemoon/mp4';
import { ridooScraper } from './embeds/ridoo'; import { ridooScraper } from './embeds/ridoo';
import { smashyStreamOScraper } from './embeds/smashystream/opstream'; import { smashyStreamOScraper } from './embeds/smashystream/opstream';
import { smashyStreamFScraper } from './embeds/smashystream/video1'; import { smashyStreamFScraper } from './embeds/smashystream/video1';
@@ -93,7 +92,6 @@ export function gatherAllEmbeds(): Array<Embed> {
ridooScraper, ridooScraper,
closeLoadScraper, closeLoadScraper,
fileMoonScraper, fileMoonScraper,
fileMoonMp4Scraper,
vidplayScraper, vidplayScraper,
wootlyScraper, wootlyScraper,
doodScraper, doodScraper,

View File

@@ -11,7 +11,7 @@ const fileRegex = /file:"(.*?)"/g;
export const fileMoonScraper = makeEmbed({ export const fileMoonScraper = makeEmbed({
id: 'filemoon', id: 'filemoon',
name: 'Filemoon', name: 'Filemoon',
rank: 300, rank: 400,
scrape: async (ctx) => { scrape: async (ctx) => {
const embedRes = await ctx.proxiedFetcher<string>(ctx.url, { const embedRes = await ctx.proxiedFetcher<string>(ctx.url, {
headers: { headers: {

View File

@@ -1,37 +0,0 @@
import { NotFoundError } from '@/utils/errors';
import { makeEmbed } from '../../base';
import { fileMoonScraper } from './index';
export const fileMoonMp4Scraper = makeEmbed({
id: 'filemoon-mp4',
name: 'Filemoon MP4',
rank: 400,
scrape: async (ctx) => {
const result = await fileMoonScraper.scrape(ctx);
if (!result.stream) throw new NotFoundError('Failed to find result');
if (result.stream[0].type !== 'hls') throw new NotFoundError('Failed to find hls stream');
const url = result.stream[0].playlist.replace(/\/hls2\//, '/download/').replace(/\.m3u8/, '.mp4');
return {
stream: [
{
id: 'primary',
type: 'file',
qualities: {
unknown: {
type: 'mp4',
url,
},
},
flags: [],
captions: result.stream[0].captions,
},
],
};
},
});

View File

@@ -60,16 +60,10 @@ const universalScraper = async (ctx: ShowScrapeContext | MovieScrapeContext): Pr
const urlWithSubtitles = embedArr.find((v) => v.source === 'Vidplay' && v.url.includes('sub.info'))?.url; const urlWithSubtitles = embedArr.find((v) => v.source === 'Vidplay' && v.url.includes('sub.info'))?.url;
const subtitleUrl = urlWithSubtitles ? new URL(urlWithSubtitles).searchParams.get('sub.info') : null; const subtitleUrl = urlWithSubtitles ? new URL(urlWithSubtitles).searchParams.get('sub.info') : null;
if (subtitleUrl) fullUrl.searchParams.set('sub.info', subtitleUrl); if (subtitleUrl) fullUrl.searchParams.set('sub.info', subtitleUrl);
embeds.push( embeds.push({
{ embedId: 'filemoon',
embedId: 'filemoon', url: fullUrl.toString(),
url: fullUrl.toString(), });
},
{
embedId: 'filemoon-mp4',
url: fullUrl.toString(),
},
);
} }
} }