mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 12:53:24 +00:00
Compare commits
3 Commits
39ce1023c2
...
7dfd025aad
Author | SHA1 | Date | |
---|---|---|---|
|
7dfd025aad | ||
|
394d740fa0 | ||
|
f34580978b |
@@ -26,6 +26,7 @@ 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';
|
||||||
@@ -92,6 +93,7 @@ export function gatherAllEmbeds(): Array<Embed> {
|
|||||||
ridooScraper,
|
ridooScraper,
|
||||||
closeLoadScraper,
|
closeLoadScraper,
|
||||||
fileMoonScraper,
|
fileMoonScraper,
|
||||||
|
fileMoonMp4Scraper,
|
||||||
vidplayScraper,
|
vidplayScraper,
|
||||||
wootlyScraper,
|
wootlyScraper,
|
||||||
doodScraper,
|
doodScraper,
|
||||||
|
@@ -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: 400,
|
rank: 300,
|
||||||
scrape: async (ctx) => {
|
scrape: async (ctx) => {
|
||||||
const embedRes = await ctx.proxiedFetcher<string>(ctx.url, {
|
const embedRes = await ctx.proxiedFetcher<string>(ctx.url, {
|
||||||
headers: {
|
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 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(),
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user