mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-20 14:37:43 +01:00
Fix theflix redirect
This commit is contained in:
parent
b2c4b54893
commit
65d27c3f6a
1 changed files with 9 additions and 1 deletions
|
@ -95,7 +95,15 @@ async function getEpisodes(slug) {
|
|||
}
|
||||
|
||||
async function getStreamUrl(slug, type, season, episode) {
|
||||
const res = await fetch(`${BASE_URL}/${type === 'show' ? 'tv-show' : type}/${slug}/${type === 'show' ? `season-${season}/episode-${episode}` : ""}${ type === 'movie' ? '?movieInfo=' + slug : '' }`).then(d => d.text());
|
||||
let url;
|
||||
|
||||
if (type === 'show') {
|
||||
url = `${BASE_URL}/tv-show/${slug}/season-${season}/episode-${episode}`;
|
||||
} else {
|
||||
url = `${BASE_URL}/movie/${slug}?movieInfo=${slug}`;
|
||||
}
|
||||
|
||||
const res = await fetch(url).then(d => d.text());
|
||||
|
||||
const scripts = Array.from(new DOMParser().parseFromString(res, "text/html").querySelectorAll('script'));
|
||||
const prop = scripts.find((e) => e.textContent.includes("theflixvd.b-cdn"));
|
||||
|
|
Loading…
Reference in a new issue