mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-13 08:15:06 +01:00
Update theflix.js
This commit is contained in:
parent
54a619a945
commit
275de95ab1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user