1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-29 16:07:40 +01:00

Update theflix.js

This commit is contained in:
James Hawkins 2021-12-30 20:58:03 +00:00 committed by GitHub
parent 54a619a945
commit 275de95ab1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
export default theflix;