mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 10:33:25 +00:00
Compare commits
4 Commits
0e89eb52ed
...
a36d01778c
Author | SHA1 | Date | |
---|---|---|---|
|
a36d01778c | ||
|
7dfd025aad | ||
|
394d740fa0 | ||
|
f34580978b |
@@ -26,6 +26,7 @@ import { zoechipScraper } from '@/providers/sources/zoechip';
|
||||
import { bflixScraper } from './embeds/bflix';
|
||||
import { closeLoadScraper } from './embeds/closeload';
|
||||
import { fileMoonScraper } from './embeds/filemoon';
|
||||
import { fileMoonMp4Scraper } from './embeds/filemoon/mp4';
|
||||
import { ridooScraper } from './embeds/ridoo';
|
||||
import { smashyStreamOScraper } from './embeds/smashystream/opstream';
|
||||
import { smashyStreamFScraper } from './embeds/smashystream/video1';
|
||||
@@ -92,6 +93,7 @@ export function gatherAllEmbeds(): Array<Embed> {
|
||||
ridooScraper,
|
||||
closeLoadScraper,
|
||||
fileMoonScraper,
|
||||
fileMoonMp4Scraper,
|
||||
vidplayScraper,
|
||||
wootlyScraper,
|
||||
doodScraper,
|
||||
|
@@ -11,7 +11,7 @@ const fileRegex = /file:"(.*?)"/g;
|
||||
export const fileMoonScraper = makeEmbed({
|
||||
id: 'filemoon',
|
||||
name: 'Filemoon',
|
||||
rank: 400,
|
||||
rank: 300,
|
||||
scrape: async (ctx) => {
|
||||
const embedRes = await ctx.proxiedFetcher<string>(ctx.url, {
|
||||
headers: {
|
||||
|
37
src/providers/embeds/filemoon/mp4.ts
Normal file
37
src/providers/embeds/filemoon/mp4.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
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,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
});
|
@@ -60,10 +60,16 @@ const universalScraper = async (ctx: ShowScrapeContext | MovieScrapeContext): Pr
|
||||
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;
|
||||
if (subtitleUrl) fullUrl.searchParams.set('sub.info', subtitleUrl);
|
||||
embeds.push({
|
||||
embedId: 'filemoon',
|
||||
url: fullUrl.toString(),
|
||||
});
|
||||
embeds.push(
|
||||
{
|
||||
embedId: 'filemoon',
|
||||
url: fullUrl.toString(),
|
||||
},
|
||||
{
|
||||
embedId: 'filemoon-mp4',
|
||||
url: fullUrl.toString(),
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user