diff --git a/kimcartoon/kimcartoon.js b/kimcartoon/kimcartoon.js index 0b964b1..28dbfba 100644 --- a/kimcartoon/kimcartoon.js +++ b/kimcartoon/kimcartoon.js @@ -1,8 +1,8 @@ async function searchResults(keyword) { const searchUrl = `https://kimcartoon.com.co/?s=${encodeURIComponent(keyword)}`; try { - const response = await fetch(searchUrl); - const html = await response; + const response = await fetchv2(searchUrl); + const html = await response;text(); const results = []; const articleRegex = /]*class="bs styletwo"[\s\S]*?<\/article>/g; const items = html.match(articleRegex) || []; @@ -32,8 +32,8 @@ async function searchResults(keyword) { } async function extractDetails(url) { - const response = await fetch(url); - const html = await response; + const response = await fetchv2(url); + const html = await response.text(); const details = []; const descriptionMatch = html.match(/
\s*

(.*?)<\/p>/); const description = descriptionMatch ? descriptionMatch[1].trim() : `N/A`; @@ -48,8 +48,8 @@ async function extractDetails(url) { return JSON.stringify(details); } async function extractEpisodes(url) { - const response = await fetch(url); - const html = await response; + const response = await fetchv2(url); + const html = await response.text(); const episodes = []; const allMatches = [...html.matchAll(/]*>\s*\s*