diff --git a/turkish123/turkish123.js b/turkish123/turkish123.js index bed95f4..247c5b0 100644 --- a/turkish123/turkish123.js +++ b/turkish123/turkish123.js @@ -1,8 +1,8 @@ async function searchResults(keyword) { - const searchUrl = `https://hds.turkish123.com/?s=${encodeURIComponent(keyword)}`; + const searchUrl = `https://ahs.turkish123.com/?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 itemRegex = /]*class="ml-item"[^>]*>[\s\S]*?<\/div>/g; @@ -37,8 +37,8 @@ async function extractDetails(url) { const details = []; try { - const response = await fetch(url); - const html = await response; + const response = await fetchv2(url); + const html = await response.text(); const descriptionMatch = html.match(/

([\s\S]*?)<\/p>/); let description = descriptionMatch ? descriptionMatch[1].trim() : 'Weirdly the website doesn\'t provide any description, either that or I\'m blind.'; @@ -63,8 +63,8 @@ async function extractDetails(url) { } 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 episodeMatches = html.match(/[^<]*Episode (\d+)[^<]*(?:]*>[^<]*<\/span>)?[^<]*<\/a>/g); @@ -88,14 +88,14 @@ async function extractEpisodes(url) { } async function extractStreamUrl(url) { - const response = await fetch(url); - const data = await response; + const response = await fetchv2(url); + const data = await response.text(); const iframeMatch = data.match(/var copyTexti= \[']*src="(https:\/\/tukipasti\.com\/[^"]+)"[^>]*><\/iframe>'\]/); if (iframeMatch) { const iframeUrl = iframeMatch[1]; - const responseTwo = await fetch(iframeUrl); - const dataTwo = await responseTwo; + const responseTwo = await fetchv2(iframeUrl); + const dataTwo = await responseTwo.text(); const m3u8Match = dataTwo.match(/var urlPlay = '([^']+)'/); if (m3u8Match) {