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,95 @@
async function searchResults(keyword) {
const response = await fetch(`https://111.90.159.132/?s=${keyword}`);
const html = await response;
const results = [];
const filmListRegex = /<article[^>]+itemscope[^>]+itemtype="http:\/\/schema\.org\/Movie"[^>]*>[\s\S]*?<\/article>/g;
const items = html.match(filmListRegex);
if (!items) return results;
items.forEach(itemHtml => {
const titleMatch = itemHtml.match(/<p class="entry-title"[^>]*>\s*<a[^>]+>([^<]+)<\/a>/);
const hrefMatch = itemHtml.match(/<a href="([^"]+)"[^>]+title="Watch Movie:/);
const imgMatch = itemHtml.match(/<img[^>]+src="([^"]+)"[^>]+alt="([^"]+)"/);
if (titleMatch && hrefMatch && imgMatch) {
results.push({
title: titleMatch[1].trim(),
image: imgMatch[1].trim(),
href: hrefMatch[1].trim()
});
}
});
console.log(JSON.stringify(results));
return JSON.stringify(results);
}
async function extractDetails(url) {
const response = await fetch(url);
const html = await response;
const details = [];
const descriptionMatch = html.match(/<div class="entry-content entry-content-single"[^>]*>([\s\S]*?)<\/div>/);
let description = descriptionMatch ? descriptionMatch[1].replace(/<\/?[^>]+(>|$)/g, "").trim() : '';
const entities = {
'&#8216;': '',
'&#8217;': '',
'&#8220;': '“',
'&#8221;': '”',
'&#38;': '&',
'&#39;': "'",
'&#160;': ' ',
'&#169;': '©',
'&#174;': '®',
'&#8482;': '™',
};
for (const [entity, char] of Object.entries(entities)) {
description = description.replace(new RegExp(entity, 'g'), char);
}
description = description.replace(/\s+/g, ' ').replace(/Country:[^<]+/g, '').trim();
const airdateMatch = html.match(/Year: <a href="[^"]*" rel="tag">(\d{4})<\/a>/);
let airdate = airdateMatch ? airdateMatch[1] : '';
if (description && airdate) {
details.push({
description: description,
aliases: 'N/A',
airdate: airdate
});
}
console.log(details);
return JSON.stringify(details);
}
async function extractEpisodes(url) {
const episodes = [];
if (url) {
const hardcodedEpisode = {
href: url,
number: `1`
};
episodes.push(hardcodedEpisode);
}
console.log(JSON.stringify(episodes));
return JSON.stringify(episodes);
}
async function extractStreamUrl(input) {
const response = await fetch(input);
const html = await response;
console.log(html);
const sourceRegex = /<video[\s\S]*?<source\s+src=["']([^"']+)["'][^>]*>/i;
const match = html.match(sourceRegex);
const url = match ? match[1].replace(/&amp;/g, '&') : null;
console.log(url);
return url;
}

View file

@ -0,0 +1,17 @@
{
"sourceName": "OnlineMoviesHindi",
"iconUrl": "https://cdn-icons-png.freepik.com/256/14272/14272467.png",
"author": {
"name": "50/50",
"icon": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ3122kQwublLkZ6rf1fEpUP79BxZOFmH9BSA&s"
},
"version": "1.0.1",
"language": "Hindi (SUB)",
"streamType": "mp4",
"quality": "1080p",
"baseUrl": "https://111.90.159.132/",
"searchBaseUrl": "https://111.90.159.132/?s=%s",
"scriptUrl": "https://gitlab.com/50n50/sources/-/raw/main/onlinemovieshindi/onlinemovieshindi.js",
"asyncJS": true,
"type": "movies/shows"
}