This commit is contained in:
50/50 2025-10-11 17:18:45 +02:00
commit 09c423e95a
276 changed files with 54396 additions and 0 deletions

View file

@ -0,0 +1,102 @@
function cleanTitle(title) {
return title
.replace(/’/g, "'")
.replace(/–/g, "-")
.replace(/&#[0-9]+;/g, "");
}
async function searchResults(keyword) {
const results = [];
const response = await fetchv2(`https://estrenosdoramas.es/?s=${keyword}`);
const html = await response.text();
const regex = /<article[^>]*class="[^"]*bs[^"]*"[^>]*>.*?<a href="([^"]+)"[^>]*>.*?<div class="ttzz">\s*(.*?)\s*<\/div>.*?<img[^>]*src="([^"]+)"[^>]*>/gs;
let match;
while ((match = regex.exec(html)) !== null) {
results.push({
title: cleanTitle(match[2].trim()),
image: match[3].trim(),
href: match[1].trim()
});
}
return JSON.stringify(results);
}
async function extractDetails(url) {
const results = [];
const response = await fetchv2(url);
const html = await response.text();
const match = html.match(/<div class="entry-content"[^>]*>([\s\S]*?)<\/div>/);
let description = "N/A";
if (match) {
description = match[1]
.replace(/<[^>]+>/g, '')
.replace(/&#(\d+);/g, (_, code) => String.fromCharCode(code))
.replace(/&quot;/g, '"')
.replace(/&apos;/g, "'")
.replace(/&amp;/g, "&")
.trim();
}
results.push({
description: description,
aliases: 'N/A',
airdate: 'N/A'
});
return JSON.stringify(results);
}
async function extractEpisodes(url) {
const results = [];
const response = await fetchv2(url);
const html = await response.text();
const regex = /<li[^>]*id="epcheck"[^>]*>[\s\S]*?<a href="([^"]+)">/g;
let match;
while ((match = regex.exec(html)) !== null) {
results.push(match[1].trim());
}
const total = results.length;
const final = results.map((href, index) => ({
href: href,
number: total - index
}));
return JSON.stringify(final.reverse());
}
async function extractStreamUrl(url) {
try {
const response = await fetchv2(url);
const html = await response.text();
const embedMatch = html.match(/<div class="pembed" data-embed="([^"]+)"/);
if (!embedMatch) return "error";
const embedUrl = embedMatch[1].trim();
console.log(embedUrl);
const headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3",
"Referer": url
};
const embedResponse = await fetchv2(embedUrl.replace("//", "https://"), headers);
const embedHtml = await embedResponse.text();
console.log(embedHtml);
const fileMatch = embedHtml.match(/sources:\s*\[\{file:"([^"]+)"/);
if (!fileMatch) return "error";
return fileMatch[1];
} catch (err) {
console.log(err);
return "error";
}
}

View file

@ -0,0 +1,19 @@
{
"sourceName": "EstrenosDoramas",
"iconUrl": "https://i0.wp.com/estrenosdoramas.es/wp-content/uploads/2023/12/cropped-unnamed-7-192x192.png",
"author": {
"name": "50/50",
"icon": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ3122kQwublLkZ6rf1fEpUP79BxZOFmH9BSA&s"
},
"version": "1.0.0",
"language": "Spanish (DUB/SUB)",
"streamType": "HLS",
"quality": "1080p",
"baseUrl": "https://vidmoly.to/",
"searchBaseUrl": "https://vidmoly.to/",
"scriptUrl": "https://gitlab.com/50n50/sources/-/raw/main/estrenosdoramas/estrenosdoramas.js",
"type": "shows/movies",
"asyncJS": true,
"softsub": false,
"downloadSupport": false
}