From 275de95ab1c1cb501793ac23e0e39b7c5e202351 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Thu, 30 Dec 2021 20:58:03 +0000 Subject: [PATCH] Update theflix.js --- src/lib/scraper/theflix.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/scraper/theflix.js b/src/lib/scraper/theflix.js index 1283a30a..1a614ef5 100644 --- a/src/lib/scraper/theflix.js +++ b/src/lib/scraper/theflix.js @@ -85,7 +85,7 @@ 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()); + 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()); const scripts = Array.from(new DOMParser().parseFromString(res, "text/html").querySelectorAll('script')); const prop = scripts.find((e) => e.textContent.includes("theflixvd.b-cdn")); @@ -99,4 +99,4 @@ async function getStreamUrl(slug, type, season, episode) { } const theflix = { findContent, getStreamUrl, getEpisodes } -export default theflix; \ No newline at end of file +export default theflix;