mirror of
https://git.luna-app.eu/50n50/sources
synced 2025-12-24 08:15:08 +01:00
Upload
This commit is contained in:
commit
09c423e95a
276 changed files with 54396 additions and 0 deletions
122
animeunity/animeunity.js
Normal file
122
animeunity/animeunity.js
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
async function searchResults(keyword) {
|
||||
const response = await fetchv2(
|
||||
`https://www.animeunity.so/archivio?title=${keyword}`
|
||||
);
|
||||
const html = await response.text();
|
||||
|
||||
const regex = /<archivio[^>]*records="([^"]*)"/;
|
||||
const match = regex.exec(html);
|
||||
|
||||
if (!match || !match[1]) {
|
||||
return { results: [] };
|
||||
}
|
||||
|
||||
const items = JSON.parse(match[1].replaceAll(`"`, `"`));
|
||||
|
||||
const results =
|
||||
items.map((item) => ({
|
||||
title: item.title ?? item.title_eng,
|
||||
image: item.imageurl,
|
||||
href: `https://www.animeunity.so/info_api/${item.id}`,
|
||||
})) || [];
|
||||
|
||||
return JSON.stringify(results);
|
||||
}
|
||||
|
||||
async function extractDetails(url) {
|
||||
const response = await fetchv2(url);
|
||||
const json = JSON.parse(await response.text());
|
||||
|
||||
return JSON.stringify([
|
||||
{
|
||||
description: json.plot,
|
||||
aliases: "N/A",
|
||||
airdate: json.date,
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
async function extractEpisodes(url) {
|
||||
try {
|
||||
const episodes = [];
|
||||
|
||||
const apiResponse = await fetchv2(url);
|
||||
const apiJson = JSON.parse(await apiResponse.text());
|
||||
const slug = apiJson.slug;
|
||||
const idAnime = apiJson.id;
|
||||
|
||||
if (!slug) {
|
||||
console.log("No slug found in API response");
|
||||
return episodes;
|
||||
}
|
||||
|
||||
const pageResponse = await fetchv2(
|
||||
`https://www.animeunity.so/anime/${idAnime}-${slug}`
|
||||
);
|
||||
const html = await pageResponse.text();
|
||||
|
||||
const videoPlayerRegex =
|
||||
/<video-player[^>]*anime="([^"]*)"[^>]*episodes="([^"]*)"/;
|
||||
const videoPlayerMatch = html.match(videoPlayerRegex);
|
||||
if (!videoPlayerMatch) {
|
||||
console.log("No video-player tag found");
|
||||
return episodes;
|
||||
}
|
||||
|
||||
const decodeHtml = (str) =>
|
||||
str.replace(/"/g, '"').replace(/\\\//g, "/");
|
||||
|
||||
const animeJsonStr = decodeHtml(videoPlayerMatch[1]);
|
||||
const episodesJsonStr = decodeHtml(videoPlayerMatch[2]);
|
||||
|
||||
const animeData = JSON.parse(animeJsonStr);
|
||||
const episodesData = JSON.parse(episodesJsonStr);
|
||||
|
||||
episodesData.forEach((episode) => {
|
||||
episodes.push({
|
||||
href: `https://animeunity.so/anime/${idAnime}-${slug}/${episode.id}`,
|
||||
number: parseInt(episode.number),
|
||||
});
|
||||
});
|
||||
|
||||
return JSON.stringify(episodes);
|
||||
} catch (error) {
|
||||
console.log("Error extracting episodes:", error);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
async function extractStreamUrl(url) {
|
||||
try {
|
||||
const response1 = await fetchv2(url);
|
||||
const html = await response1.text();
|
||||
|
||||
const vixcloudMatch = html.match(
|
||||
/embed_url="(https:\/\/vixcloud\.co\/embed\/\d+\?[^"]+)"/
|
||||
);
|
||||
if (!vixcloudMatch) {
|
||||
console.log("No vixcloud.co URL found in the HTML.");
|
||||
return null;
|
||||
}
|
||||
|
||||
let vixcloudUrl = vixcloudMatch[1];
|
||||
vixcloudUrl = vixcloudUrl.replace(/&/g, "&");
|
||||
|
||||
const response = await fetch(vixcloudUrl);
|
||||
const downloadUrlMatch = response.match(
|
||||
/window\.downloadUrl\s*=\s*['"]([^'"]+)['"]/
|
||||
);
|
||||
|
||||
if (!downloadUrlMatch) {
|
||||
console.log("No downloadUrl found in the response.");
|
||||
return null;
|
||||
}
|
||||
|
||||
const downloadURL = downloadUrlMatch[1];
|
||||
console.log(downloadURL);
|
||||
return downloadURL;
|
||||
} catch (error) {
|
||||
console.log("Fetch error:", error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
17
animeunity/animeuntiy.json
Normal file
17
animeunity/animeuntiy.json
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"sourceName": "AnimeUnity",
|
||||
"iconUrl": "https://github.com/cottonable/Ryu-preservation/blob/2f10226aa087154974a70c1ec78aa83a47daced9/Ryu/Assets.xcassets/Sources/AnimeUnity.imageset/apple-touch-icon.jpg?raw=true",
|
||||
"author": {
|
||||
"name": "sobet",
|
||||
"icon": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRQPQ1qIiALbM3xDWGsuJzu6ItaQGwb9ICRRw&s"
|
||||
},
|
||||
"version": "1.0.4",
|
||||
"language": "Italian",
|
||||
"streamType": "mp4",
|
||||
"quality": "720p",
|
||||
"baseUrl": "https://animeunity.so",
|
||||
"searchBaseUrl": "https://www.animeunity.so/archivio?title=%s",
|
||||
"scriptUrl": "https://gitlab.com/50n50/sources/-/raw/main/animeunity/animeunity.js",
|
||||
"asyncJS": true,
|
||||
"type": "anime"
|
||||
}
|
||||
BIN
animeunity/iconalt.png
Normal file
BIN
animeunity/iconalt.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 68 KiB |
Loading…
Add table
Add a link
Reference in a new issue