mirror of
https://git.luna-app.eu/50n50/sources
synced 2025-12-21 21:26:19 +01:00
Upload
This commit is contained in:
commit
09c423e95a
276 changed files with 54396 additions and 0 deletions
113
animedefenders/animedefenders.js
Normal file
113
animedefenders/animedefenders.js
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
async function searchResults(keyword) {
|
||||
const results = [];
|
||||
try {
|
||||
const response = await fetchv2("https://animedefenders.me/view/?wd=" + encodeURIComponent(keyword));
|
||||
const html = await response.text();
|
||||
|
||||
const regex = /<a class="vod-item-img shining" href="(.*?)">[\s\S]*?data-original="(.*?)"[\s\S]*?<h3 class="vod-item-title.*?"><a href=".*?">(.*?)<\/a><\/h3>/g;
|
||||
let match;
|
||||
while ((match = regex.exec(html)) !== null) {
|
||||
results.push({
|
||||
title: match[3].trim(),
|
||||
image: match[2].trim(),
|
||||
href: "https://animedefenders.me" + match[1].trim()
|
||||
});
|
||||
}
|
||||
|
||||
return JSON.stringify(results);
|
||||
} catch (err) {
|
||||
return JSON.stringify([{
|
||||
title: "Error",
|
||||
image: "Error",
|
||||
href: "Error"
|
||||
}]);
|
||||
}
|
||||
}
|
||||
|
||||
async function extractDetails(url) {
|
||||
try {
|
||||
const response = await fetchv2(url);
|
||||
const html = await response.text();
|
||||
|
||||
const descriptionRegex = /<div class="detail-desc-content layout-box">\s*<p>(.*?)<\/p>\s*<\/div>/s;
|
||||
const match = html.match(descriptionRegex);
|
||||
|
||||
let description = "N/A";
|
||||
if (match && match[1]) {
|
||||
description = match[1]
|
||||
.replace(/<br\s*\/?>/gi, ' ')
|
||||
.replace(/<[^>]*>/g, '')
|
||||
.replace(/\s+/g, ' ')
|
||||
.trim();
|
||||
}
|
||||
|
||||
return JSON.stringify([{
|
||||
description: description,
|
||||
aliases: "N/A",
|
||||
airdate: "N/A"
|
||||
}]);
|
||||
} catch (err) {
|
||||
return JSON.stringify([{
|
||||
description: "Error",
|
||||
aliases: "Error",
|
||||
airdate: "Error"
|
||||
}]);
|
||||
}
|
||||
}
|
||||
|
||||
async function extractEpisodes(url) {
|
||||
const results = [];
|
||||
try {
|
||||
const response = await fetchv2(url);
|
||||
const html = await response.text();
|
||||
|
||||
const regex = /<a class="text-overflow ep" href="([^"]+)">(\d+)<\/a>/g;
|
||||
let match;
|
||||
|
||||
while ((match = regex.exec(html)) !== null) {
|
||||
results.push({
|
||||
href: "https://animedefenders.me" + match[1].trim(),
|
||||
number: parseInt(match[2], 10)
|
||||
});
|
||||
}
|
||||
|
||||
return JSON.stringify(results.reverse());
|
||||
} catch (err) {
|
||||
return JSON.stringify([{
|
||||
href: "Error",
|
||||
number: "Error"
|
||||
}]);
|
||||
}
|
||||
}
|
||||
|
||||
async function extractStreamUrl(url) {
|
||||
try {
|
||||
const response = await fetchv2(url);
|
||||
const html = await response.text();
|
||||
|
||||
const subUrlRegex = /data-url="(https:\/\/ee\.anih1\.top\/bb\/sub[^"]+)"/;
|
||||
const match = html.match(subUrlRegex);
|
||||
|
||||
if (match && match[1]) {
|
||||
const subUrl = match[1];
|
||||
const headers = {
|
||||
"Referer": "https://ee.anih1.top",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
|
||||
};
|
||||
|
||||
const subResponse = await fetchv2(subUrl, headers);
|
||||
const subHtml = await subResponse.text();
|
||||
|
||||
const artplayerRegex = /url:\s*'([^']+\.m3u8)'/;
|
||||
const artMatch = subHtml.match(artplayerRegex);
|
||||
|
||||
if (artMatch && artMatch[1]) {
|
||||
return artMatch[1];
|
||||
}
|
||||
}
|
||||
console.log("No stream URL found");
|
||||
return "https://error.org/";
|
||||
} catch (err) {
|
||||
return "https://error.org/";
|
||||
}
|
||||
}
|
||||
19
animedefenders/animedefenders.json
Normal file
19
animedefenders/animedefenders.json
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"sourceName": "AnimeDefenders",
|
||||
"iconUrl": "https://cdn.jsdelivr.net/gh/756751uosmaqy/vjplayer@main/2fcbd487e5cacb41cbe7802d5ccfc0dc.png",
|
||||
"author": {
|
||||
"name": "50/50",
|
||||
"icon": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ3122kQwublLkZ6rf1fEpUP79BxZOFmH9BSA&s"
|
||||
},
|
||||
"version": "1.0.0",
|
||||
"language": "English (SUB)",
|
||||
"streamType": "HLS",
|
||||
"quality": "1080p",
|
||||
"baseUrl": "https://ee.anih1.top",
|
||||
"searchBaseUrl": "https://ee.anih1.top",
|
||||
"scriptUrl": "https://gitlab.com/50n50/sources/-/raw/main/animedefenders/animedefenders.js",
|
||||
"type": "anime",
|
||||
"asyncJS": true,
|
||||
"softsub": false,
|
||||
"downloadSupport": false
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue