diff --git a/src/source/Movix.ts b/src/source/Movix.ts index dbb3289..b075e24 100644 --- a/src/source/Movix.ts +++ b/src/source/Movix.ts @@ -4,6 +4,7 @@ import { Fetcher, getTmdbId, Id } from '../utils'; import { Source, SourceResult } from './Source'; interface MovixApiData { + iframe_src: string; player_links?: { decoded_url: string }[]; } @@ -18,8 +19,6 @@ export class Movix extends Source { public readonly baseUrl = 'https://api.movix.site'; - private readonly baseWebsiteUrl = 'https://movix.website'; - private readonly fetcher: Fetcher; public constructor(fetcher: Fetcher) { @@ -48,6 +47,6 @@ export class Movix extends Source { ? `${json['tmdb_details']['title']} ${tmdbId.season}x${tmdbId.episode}` : json['tmdb_details']['title']; - return urls.map(url => ({ url, meta: { countryCodes: [CountryCode.fr], referer: this.baseWebsiteUrl, title } })); + return urls.map(url => ({ url, meta: { countryCodes: [CountryCode.fr], referer: data.iframe_src, title } })); }; } diff --git a/src/source/__snapshots__/Movix.test.ts.snap b/src/source/__snapshots__/Movix.test.ts.snap index dd904b9..86dd4b2 100644 --- a/src/source/__snapshots__/Movix.test.ts.snap +++ b/src/source/__snapshots__/Movix.test.ts.snap @@ -7,7 +7,7 @@ exports[`Movix handle battle royal 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17959&ads=true", "title": "Battle Royale", }, "url": "https://lecteur6.com/video/18085327b86002fc604c323b9a07f997", @@ -17,7 +17,7 @@ exports[`Movix handle battle royal 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17959&ads=true", "title": "Battle Royale", }, "url": "https://vidoza.net/embed-55hvynbdyqvc.html", @@ -27,7 +27,7 @@ exports[`Movix handle battle royal 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17959&ads=true", "title": "Battle Royale", }, "url": "https://wishonly.site/e/kykhuv6tscs8", @@ -37,7 +37,7 @@ exports[`Movix handle battle royal 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17959&ads=true", "title": "Battle Royale", }, "url": "https://darkibox.com/embed-5ghz7myucfjq.html", @@ -47,7 +47,7 @@ exports[`Movix handle battle royal 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17959&ads=true", "title": "Battle Royale", }, "url": "https://supervideo.cc/e/uieh17bid0ce", @@ -57,7 +57,7 @@ exports[`Movix handle battle royal 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17959&ads=true", "title": "Battle Royale", }, "url": "https://dood.li/e/gha75crrm8nf", @@ -67,7 +67,7 @@ exports[`Movix handle battle royal 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17959&ads=true", "title": "Battle Royale", }, "url": "https://filemoon.sx/e/c5lhlypfasmm", @@ -77,7 +77,7 @@ exports[`Movix handle battle royal 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17959&ads=true", "title": "Battle Royale", }, "url": "https://voe.sx/e/aghpmosgkhsu", @@ -87,7 +87,7 @@ exports[`Movix handle battle royal 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17959&ads=true", "title": "Battle Royale", }, "url": "http://vidmoly.me/embed-79w00r2qv88n.html", @@ -97,7 +97,7 @@ exports[`Movix handle battle royal 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17959&ads=true", "title": "Battle Royale", }, "url": "https://waaw.to/f/JWzt5eJSbpu8", @@ -107,7 +107,7 @@ exports[`Movix handle battle royal 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17959&ads=true", "title": "Battle Royale", }, "url": "https://veev.to/e/lu4c24e3aetf", @@ -117,7 +117,7 @@ exports[`Movix handle battle royal 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17959&ads=true", "title": "Battle Royale", }, "url": "https://listeamed.net/e/eL2157Kzw8m5rw4", @@ -132,7 +132,7 @@ exports[`Movix handle tmdb black mirror s4e2 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17320&ads=true", "title": "Black Mirror 4x2", }, "url": "https://uqload.net/embed-xjmhb7rbzdjh.html", @@ -142,7 +142,7 @@ exports[`Movix handle tmdb black mirror s4e2 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17320&ads=true", "title": "Black Mirror 4x2", }, "url": "https://lulustream.com/e/c3defa2cbtmm", @@ -152,7 +152,7 @@ exports[`Movix handle tmdb black mirror s4e2 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17320&ads=true", "title": "Black Mirror 4x2", }, "url": "https://wishonly.site/e/bzfdmjlrsqxk", @@ -162,7 +162,7 @@ exports[`Movix handle tmdb black mirror s4e2 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17320&ads=true", "title": "Black Mirror 4x2", }, "url": "https://vidoza.net/embed-i2e8gn4m64e1.html", @@ -172,7 +172,7 @@ exports[`Movix handle tmdb black mirror s4e2 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17320&ads=true", "title": "Black Mirror 4x2", }, "url": "https://filemoon.sx/e/0iuzfpt5cbx6", @@ -182,7 +182,7 @@ exports[`Movix handle tmdb black mirror s4e2 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17320&ads=true", "title": "Black Mirror 4x2", }, "url": "https://voe.sx/e/mustkdlxo67t", @@ -192,7 +192,7 @@ exports[`Movix handle tmdb black mirror s4e2 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17320&ads=true", "title": "Black Mirror 4x2", }, "url": "http://vidmoly.me/embed-2rls953tvhxc.html", @@ -202,7 +202,7 @@ exports[`Movix handle tmdb black mirror s4e2 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17320&ads=true", "title": "Black Mirror 4x2", }, "url": "https://waaw.to/f/GdQ6mHpxPdd8", @@ -212,7 +212,7 @@ exports[`Movix handle tmdb black mirror s4e2 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17320&ads=true", "title": "Black Mirror 4x2", }, "url": "https://veev.to/e/nifwerilwo0i", @@ -222,7 +222,7 @@ exports[`Movix handle tmdb black mirror s4e2 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17320&ads=true", "title": "Black Mirror 4x2", }, "url": "https://listeamed.net/e/8ozgENePwdLxmjA", @@ -232,7 +232,7 @@ exports[`Movix handle tmdb black mirror s4e2 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17320&ads=true", "title": "Black Mirror 4x2", }, "url": "https://coflix.upn.one/#x63hig", @@ -242,7 +242,7 @@ exports[`Movix handle tmdb black mirror s4e2 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17320&ads=true", "title": "Black Mirror 4x2", }, "url": "https://do7go.com/e/2zn4y7ueq1ta", @@ -252,7 +252,7 @@ exports[`Movix handle tmdb black mirror s4e2 1`] = ` "countryCodes": [ "fr", ], - "referer": "https://movix.website", + "referer": "https://lecteurvideo.com/embed.php?id=17320&ads=true", "title": "Black Mirror 4x2", }, "url": "https://movearnpre.com/embed/eiel2p4z74kp",