From 286041b09314247a9fc84c68e5af918e63efec18 Mon Sep 17 00:00:00 2001 From: aka paul <80717571+50n50@users.noreply.github.com> Date: Thu, 30 Apr 2026 16:52:45 +0200 Subject: [PATCH] Remove proxy and fix subtitles --- 1movies/1movies.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/1movies/1movies.js b/1movies/1movies.js index 732fa0e..3858307 100644 --- a/1movies/1movies.js +++ b/1movies/1movies.js @@ -27,7 +27,7 @@ async function searchResults(query) { if (fullHref && imageSrc && cleanTitle) { results.push({ href: fullHref, - image: "https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(imageSrc), + image: imageSrc, title: cleanTitle }); } @@ -44,7 +44,7 @@ async function searchResults(query) { `${searchBaseUrl}${encodedQuery}&page=3` ]; - const responses = await Promise.all(urls.map(url => fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(url)))); + const responses = await Promise.all(urls.map(url => fetchv2(url))); const htmlTexts = await Promise.all(responses.map(response => response.text())); @@ -60,13 +60,13 @@ async function searchResults(query) { href: "", image: "", title: "Search failed: " + error.message - }]); + }]); + } } -} async function extractDetails(url) { try { - const response = await fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(url)); + const response = await fetchv2(url); const htmlText = await response.text(); const descriptionMatch = (/
([\s\S]*?)<\/div>/.exec(htmlText) || [])[1]; @@ -90,7 +90,7 @@ async function extractDetails(url) { async function extractEpisodes(movieUrl) { try { - const response = await fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(movieUrl)); + const response = await fetchv2(movieUrl); const htmlText = await response.text(); const movieIDMatch = (htmlText.match(/
]*id="movie-rating"[^>]*data-id="([^"]+)"/) || [])[1]; if (!movieIDMatch) { @@ -105,7 +105,7 @@ async function extractEpisodes(movieUrl) { const token = movieIdTokenData.result; const episodeListUrl = `https://1movies.bz/ajax/episodes/list?id=${movieIDMatch}&_=${token}`; - const episodeListResponse = await fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(episodeListUrl)); + const episodeListResponse = await fetchv2(episodeListUrl); const episodeListData = await episodeListResponse.json(); const cleanedHtml = cleanJsonHtml(episodeListData.result); @@ -143,7 +143,7 @@ async function extractStreamUrl(url) { url = url.replace('&_=ENCRYPT_ME', `&_=${encryptedToken}`); } - const response = await fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(url)); + const response = await fetchv2(url); const responseData = await response.json(); const cleanedHtml = cleanJsonHtml(responseData.result); @@ -167,7 +167,7 @@ async function extractStreamUrl(url) { } const streamUrl = `https://1movies.bz/ajax/links/view?id=${serverId}&_=${token}`; - const streamResponse = await fetchv2("https://deno-proxies-sznvnpnxwhbv.deno.dev/?url=" + encodeURIComponent(streamUrl)); + const streamResponse = await fetchv2(streamUrl); const streamData = await streamResponse.json(); if (!streamData.result) { @@ -175,7 +175,6 @@ async function extractStreamUrl(url) { return "error"; } - // Fix: no encodeURIComponent, pass headers with browser UA const decryptData = await fetchv2( `https://enc-dec.app/api/dec-movies-flix?text=${streamData.result}`, headers @@ -219,7 +218,7 @@ async function extractStreamUrl(url) { "POST", JSON.stringify({ text: result, agent: headers["User-Agent"] }) ).then(res => res.json()); - + console.log("Final JSON: " + JSON.stringify(finalJson)); const m3u8Link = finalJson?.result?.sources?.[0]?.file; const m3u8Response = await fetchv2(m3u8Link); @@ -253,7 +252,7 @@ async function extractStreamUrl(url) { const returnValue = { streams: streams, - subtitle: englishSubUrl !== "N/A" ? englishSubUrl : "" + subtitles: englishSubUrl !== "N/A" ? englishSubUrl : "" }; console.log("RETURN: " + JSON.stringify(returnValue)); return JSON.stringify(returnValue);