mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 15:03:26 +00:00
Compare commits
10 Commits
94bfcd0c31
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
fe04267494 | ||
|
89a78e4ae9 | ||
|
3826b8d887 | ||
|
f0d9ee2944 | ||
|
8de7e61eab | ||
|
95617763d0 | ||
|
0a2259b1f4 | ||
|
79a8fdca6d | ||
|
53fbc3b42d | ||
|
8abc8b96e4 |
@@ -2,6 +2,11 @@
|
|||||||
title: 'Changelog'
|
title: 'Changelog'
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Version 2.3.0
|
||||||
|
- Fixed RidoMovies search results
|
||||||
|
- Added Insertunit, SoaperTV, and WarezCDN providers
|
||||||
|
- Disabled Showbox and VidSrc
|
||||||
|
|
||||||
# Version 2.2.9
|
# Version 2.2.9
|
||||||
- Fixed VidSrcTo (both Vidplay and Filemoon embeds)
|
- Fixed VidSrcTo (both Vidplay and Filemoon embeds)
|
||||||
- Added dropload, filelions and vtube embeds to Primewire
|
- Added dropload, filelions and vtube embeds to Primewire
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@movie-web/providers",
|
"name": "@movie-web/providers",
|
||||||
"version": "2.2.9",
|
"version": "2.3.0",
|
||||||
"description": "Package that contains all the providers of movie-web",
|
"description": "Package that contains all the providers of movie-web",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
|
@@ -6,6 +6,7 @@ export const vidsrcScraper = makeSourcerer({
|
|||||||
id: 'vidsrc',
|
id: 'vidsrc',
|
||||||
name: 'VidSrc',
|
name: 'VidSrc',
|
||||||
rank: 90,
|
rank: 90,
|
||||||
|
disabled: true,
|
||||||
flags: [],
|
flags: [],
|
||||||
scrapeMovie,
|
scrapeMovie,
|
||||||
scrapeShow,
|
scrapeShow,
|
||||||
|
@@ -1,4 +1,24 @@
|
|||||||
|
import { ScrapeContext } from '@/utils/context';
|
||||||
|
|
||||||
export const warezcdnBase = 'https://embed.warezcdn.com';
|
export const warezcdnBase = 'https://embed.warezcdn.com';
|
||||||
export const warezcdnApiBase = 'https://warezcdn.com/embed';
|
export const warezcdnApiBase = 'https://warezcdn.com/embed';
|
||||||
export const warezcdnPlayerBase = 'https://warezcdn.com/player';
|
export const warezcdnPlayerBase = 'https://warezcdn.com/player';
|
||||||
export const warezcdnWorkerProxy = 'https://workerproxy.warezcdn.workers.dev';
|
export const warezcdnWorkerProxy = 'https://workerproxy.warezcdn.workers.dev';
|
||||||
|
|
||||||
|
export async function getExternalPlayerUrl(ctx: ScrapeContext, embedId: string, embedUrl: string) {
|
||||||
|
const params = {
|
||||||
|
id: embedUrl,
|
||||||
|
sv: embedId,
|
||||||
|
};
|
||||||
|
const realUrl = await ctx.proxiedFetcher<string>(`/getPlay.php`, {
|
||||||
|
baseUrl: warezcdnApiBase,
|
||||||
|
headers: {
|
||||||
|
Referer: `${warezcdnApiBase}/getEmbed.php?${new URLSearchParams(params)}`,
|
||||||
|
},
|
||||||
|
query: params,
|
||||||
|
});
|
||||||
|
|
||||||
|
const realEmbedUrl = realUrl.match(/window\.location\.href="([^"]*)";/);
|
||||||
|
if (!realEmbedUrl) throw new Error('Could not find embed url');
|
||||||
|
return realEmbedUrl[1];
|
||||||
|
}
|
||||||
|
@@ -5,19 +5,20 @@ import { SourcererEmbed, makeSourcerer } from '@/providers/base';
|
|||||||
import { mixdropScraper } from '@/providers/embeds/mixdrop';
|
import { mixdropScraper } from '@/providers/embeds/mixdrop';
|
||||||
import { warezcdnembedHlsScraper } from '@/providers/embeds/warezcdn/hls';
|
import { warezcdnembedHlsScraper } from '@/providers/embeds/warezcdn/hls';
|
||||||
import { warezcdnembedMp4Scraper } from '@/providers/embeds/warezcdn/mp4';
|
import { warezcdnembedMp4Scraper } from '@/providers/embeds/warezcdn/mp4';
|
||||||
import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context';
|
|
||||||
import { NotFoundError } from '@/utils/errors';
|
import { NotFoundError } from '@/utils/errors';
|
||||||
|
|
||||||
import { warezcdnApiBase, warezcdnBase } from './common';
|
import { getExternalPlayerUrl, warezcdnBase } from './common';
|
||||||
|
import { SerieAjaxResponse } from './types';
|
||||||
|
|
||||||
const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) => {
|
export const warezcdnScraper = makeSourcerer({
|
||||||
|
id: 'warezcdn',
|
||||||
|
name: 'WarezCDN',
|
||||||
|
rank: 81,
|
||||||
|
flags: [flags.CORS_ALLOWED],
|
||||||
|
scrapeMovie: async (ctx) => {
|
||||||
if (!ctx.media.imdbId) throw new NotFoundError('This source requires IMDB id.');
|
if (!ctx.media.imdbId) throw new NotFoundError('This source requires IMDB id.');
|
||||||
|
|
||||||
let id = `filme/${ctx.media.imdbId}`;
|
const serversPage = await ctx.proxiedFetcher<string>(`/filme/${ctx.media.imdbId}`, {
|
||||||
if (ctx.media.type === 'show')
|
|
||||||
id = `serie/${ctx.media.imdbId}/${ctx.media.season.number}/${ctx.media.episode.number}`;
|
|
||||||
|
|
||||||
const serversPage = await ctx.proxiedFetcher<string>(`/${id}`, {
|
|
||||||
baseUrl: warezcdnBase,
|
baseUrl: warezcdnBase,
|
||||||
});
|
});
|
||||||
const $ = load(serversPage);
|
const $ = load(serversPage);
|
||||||
@@ -31,23 +32,11 @@ const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) =>
|
|||||||
const embedUrl = $(element).attr('data-load-embed')!;
|
const embedUrl = $(element).attr('data-load-embed')!;
|
||||||
|
|
||||||
if (embedHost === 'mixdrop') {
|
if (embedHost === 'mixdrop') {
|
||||||
const params = {
|
const realEmbedUrl = await getExternalPlayerUrl(ctx, 'mixdrop', embedUrl);
|
||||||
id: embedUrl,
|
|
||||||
sv: 'mixdrop',
|
|
||||||
};
|
|
||||||
const realUrl = await ctx.proxiedFetcher<string>(`/getPlay.php`, {
|
|
||||||
baseUrl: warezcdnApiBase,
|
|
||||||
headers: {
|
|
||||||
Referer: `${warezcdnApiBase}/getEmbed.php?${new URLSearchParams(params)}`,
|
|
||||||
},
|
|
||||||
query: params,
|
|
||||||
});
|
|
||||||
|
|
||||||
const realEmbedUrl = realUrl.match(/window\.location\.href="([^"]*)";/);
|
|
||||||
if (!realEmbedUrl) throw new Error('Could not find embed url');
|
if (!realEmbedUrl) throw new Error('Could not find embed url');
|
||||||
embeds.push({
|
embeds.push({
|
||||||
embedId: mixdropScraper.id,
|
embedId: mixdropScraper.id,
|
||||||
url: realEmbedUrl[1],
|
url: realEmbedUrl,
|
||||||
});
|
});
|
||||||
} else if (embedHost === 'warezcdn') {
|
} else if (embedHost === 'warezcdn') {
|
||||||
embeds.push(
|
embeds.push(
|
||||||
@@ -66,13 +55,60 @@ const universalScraper = async (ctx: MovieScrapeContext | ShowScrapeContext) =>
|
|||||||
return {
|
return {
|
||||||
embeds,
|
embeds,
|
||||||
};
|
};
|
||||||
};
|
},
|
||||||
|
scrapeShow: async (ctx) => {
|
||||||
|
if (!ctx.media.imdbId) throw new NotFoundError('This source requires IMDB id.');
|
||||||
|
|
||||||
export const warezcdnScraper = makeSourcerer({
|
const url = `${warezcdnBase}/serie/${ctx.media.imdbId}/${ctx.media.season.number}/${ctx.media.episode.number}`;
|
||||||
id: 'warezcdn',
|
|
||||||
name: 'WarezCDN',
|
const serversPage = await ctx.proxiedFetcher<string>(url);
|
||||||
rank: 81,
|
|
||||||
flags: [flags.CORS_ALLOWED],
|
const episodeId = serversPage.match(/\$\('\[data-load-episode-content="(\d+)"\]'\)/)?.[1];
|
||||||
scrapeMovie: universalScraper,
|
|
||||||
scrapeShow: universalScraper,
|
if (!episodeId) throw new NotFoundError('Failed to find episode id');
|
||||||
|
|
||||||
|
const streamsData = await ctx.proxiedFetcher<string>(`/serieAjax.php`, {
|
||||||
|
method: 'POST',
|
||||||
|
baseUrl: warezcdnBase,
|
||||||
|
body: new URLSearchParams({
|
||||||
|
getAudios: episodeId,
|
||||||
|
}),
|
||||||
|
headers: {
|
||||||
|
Origin: warezcdnBase,
|
||||||
|
Referer: url,
|
||||||
|
'X-Requested-With': 'XMLHttpRequest',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const streams: SerieAjaxResponse = JSON.parse(streamsData);
|
||||||
|
const list = streams.list['0'];
|
||||||
|
const embeds: SourcererEmbed[] = [];
|
||||||
|
|
||||||
|
// 3 means ok
|
||||||
|
if (list.mixdropStatus === '3') {
|
||||||
|
const realEmbedUrl = await getExternalPlayerUrl(ctx, 'mixdrop', list.id);
|
||||||
|
if (!realEmbedUrl) throw new Error('Could not find embed url');
|
||||||
|
embeds.push({
|
||||||
|
embedId: mixdropScraper.id,
|
||||||
|
url: realEmbedUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (list.warezcdnStatus === '3') {
|
||||||
|
embeds.push(
|
||||||
|
{
|
||||||
|
embedId: warezcdnembedHlsScraper.id,
|
||||||
|
url: list.id,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
embedId: warezcdnembedMp4Scraper.id,
|
||||||
|
url: list.id,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
embeds,
|
||||||
|
};
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
16
src/providers/sources/warezcdn/types.ts
Normal file
16
src/providers/sources/warezcdn/types.ts
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
interface Data {
|
||||||
|
id: string;
|
||||||
|
audio: string;
|
||||||
|
mixdropStatus: string;
|
||||||
|
fembedStatus: string;
|
||||||
|
streamtapeStatus: string;
|
||||||
|
warezcdnStatus: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
type List = {
|
||||||
|
[key: string]: Data;
|
||||||
|
};
|
||||||
|
|
||||||
|
export interface SerieAjaxResponse {
|
||||||
|
list: List;
|
||||||
|
}
|
Reference in New Issue
Block a user