1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-20 14:37:43 +01:00

fix: Fix Lookmovie scraper

Only set phpsessid variable if returned as a header
This commit is contained in:
Josh Heng 2021-09-27 15:29:33 +01:00 committed by GitHub
parent 9193db6f32
commit 62ca94e4b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,7 +147,7 @@ async function getEpisodes(slug) {
async function getStreamUrl(slug, type, season, episode) { async function getStreamUrl(slug, type, season, episode) {
const url = `${BASE_URL}/${type}s/view/${slug}`; const url = `${BASE_URL}/${type}s/view/${slug}`;
const pageRes = await fetch(url); const pageRes = await fetch(url);
phpsessid = pageRes.headers.get('phpsessid'); if (pageRes.headers.get('phpsessid')) phpsessid = pageRes.headers.get('phpsessid');
const pageResText = await pageRes.text(); const pageResText = await pageRes.text();
const data = JSON5.parse("{" + const data = JSON5.parse("{" +