Update turkish123/turkish123.js

This commit is contained in:
aka paul
2026-03-14 11:40:09 +00:00
parent a32db404cd
commit 78992bbd25
+11 -11
View File
@@ -1,8 +1,8 @@
async function searchResults(keyword) { async function searchResults(keyword) {
const searchUrl = `https://hds.turkish123.com/?s=${encodeURIComponent(keyword)}`; const searchUrl = `https://ahs.turkish123.com/?s=${encodeURIComponent(keyword)}`;
try { try {
const response = await fetch(searchUrl); const response = await fetchv2(searchUrl);
const html = await response; const html = await response.text();
const results = []; const results = [];
const itemRegex = /<div[^>]*class="ml-item"[^>]*>[\s\S]*?<\/div>/g; const itemRegex = /<div[^>]*class="ml-item"[^>]*>[\s\S]*?<\/div>/g;
@@ -37,8 +37,8 @@ async function extractDetails(url) {
const details = []; const details = [];
try { try {
const response = await fetch(url); const response = await fetchv2(url);
const html = await response; const html = await response.text();
const descriptionMatch = html.match(/<p class="f-desc">([\s\S]*?)<\/p>/); const descriptionMatch = html.match(/<p class="f-desc">([\s\S]*?)<\/p>/);
let description = descriptionMatch ? descriptionMatch[1].trim() : 'Weirdly the website doesn\'t provide any description, either that or I\'m blind.'; 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) { async function extractEpisodes(url) {
const response = await fetch(url); const response = await fetchv2(url);
const html = await response; const html = await response.text();
const episodes = []; const episodes = [];
const episodeMatches = html.match(/<a class="episodi" href="([^"]+)">[^<]*Episode (\d+)[^<]*(?:<span[^>]*>[^<]*<\/span>)?[^<]*<\/a>/g); const episodeMatches = html.match(/<a class="episodi" href="([^"]+)">[^<]*Episode (\d+)[^<]*(?:<span[^>]*>[^<]*<\/span>)?[^<]*<\/a>/g);
@@ -88,14 +88,14 @@ async function extractEpisodes(url) {
} }
async function extractStreamUrl(url) { async function extractStreamUrl(url) {
const response = await fetch(url); const response = await fetchv2(url);
const data = await response; const data = await response.text();
const iframeMatch = data.match(/var copyTexti= \['<iframe[^>]*src="(https:\/\/tukipasti\.com\/[^"]+)"[^>]*><\/iframe>'\]/); const iframeMatch = data.match(/var copyTexti= \['<iframe[^>]*src="(https:\/\/tukipasti\.com\/[^"]+)"[^>]*><\/iframe>'\]/);
if (iframeMatch) { if (iframeMatch) {
const iframeUrl = iframeMatch[1]; const iframeUrl = iframeMatch[1];
const responseTwo = await fetch(iframeUrl); const responseTwo = await fetchv2(iframeUrl);
const dataTwo = await responseTwo; const dataTwo = await responseTwo.text();
const m3u8Match = dataTwo.match(/var urlPlay = '([^']+)'/); const m3u8Match = dataTwo.match(/var urlPlay = '([^']+)'/);
if (m3u8Match) { if (m3u8Match) {