From 62ca94e4b6e0fe7457e9e64692e2efb45d43f124 Mon Sep 17 00:00:00 2001 From: Josh Heng Date: Mon, 27 Sep 2021 15:29:33 +0100 Subject: [PATCH] fix: Fix Lookmovie scraper Only set phpsessid variable if returned as a header --- src/lib/scraper/lookmovie.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/scraper/lookmovie.js b/src/lib/scraper/lookmovie.js index 3ddc3c32..8475687e 100644 --- a/src/lib/scraper/lookmovie.js +++ b/src/lib/scraper/lookmovie.js @@ -147,7 +147,7 @@ async function getEpisodes(slug) { async function getStreamUrl(slug, type, season, episode) { const url = `${BASE_URL}/${type}s/view/${slug}`; 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 data = JSON5.parse("{" +