diff --git a/mapple/mapple.js b/mapple/mapple.js index c634434..d14ae49 100644 --- a/mapple/mapple.js +++ b/mapple/mapple.js @@ -199,8 +199,8 @@ async function extractNextActionIdentifier(watchUrl) { throw new Error("error 1"); } - const beforeLayoutMatch = htmlText.match(/]*src="([^"]*\.js)"[^>]*><\/script>]*src="[^"]*app\/watch\/movie\/[^"]*layout-[^"]*\.js"/); - + const beforeLayoutMatch = htmlText.match(/]*src="([^"]*\.js)"[^>]*><\/script>]*src="[^"]*app\/watch\/(movie|tv)\/[^"]*layout-[^"]*\.js"/); + if (!beforeLayoutMatch || !beforeLayoutMatch[1]) { throw new Error("error 2"); }