fix and push
Sync Versions to index.json / sync-versions (push) Successful in 27s
Fetch and Save Remote Content / fetch (push) Failing after 11m8s

This commit is contained in:
aka paul
2026-06-03 18:03:15 +02:00
parent 400cf96447
commit 6ba98ebfd8
6 changed files with 6467 additions and 34 deletions
File diff suppressed because it is too large Load Diff
+27
View File
@@ -0,0 +1,27 @@
{
"sourceName": "AnimeVerse",
"iconUrl": "https://animeverse.to/apple-touch-icon.png",
"author": {
"name": "50/50",
"icon": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ3122kQwublLkZ6rf1fEpUP79BxZOFmH9BSA&s"
},
"version": "1.0.0",
"language": "English",
"streamType": "HLS",
"quality": "1080p",
"baseUrl": "https://animeverse.to/",
"searchBaseUrl": "https://animeverse.to/",
"scriptUrl": "https://git.luna-app.eu/50n50/sources/raw/branch/main/animeverse/animeverse.js",
"type": "anime",
"asyncJS": true,
"softsub": true,
"downloadSupport": true,
"supportsSora": true,
"supportsLuna": true,
"supportsMojuru": true,
"supportsDartotsu": true,
"supportsAnymex": true,
"supportsTsumi": true,
"supportsHiyoku": true,
"supportsShirox": true
}
+45 -31
View File
@@ -1,18 +1,23 @@
async function searchResults(keyword, page=0) { async function searchResults(keyword, page = 0) {
const results = []; const results = [];
try { try {
const response = await fetch("https://mangabuddy.com/api/manga/search?q=" + encodeURIComponent(keyword)); const response = await fetch("https://mangak.io/search?q=" + encodeURIComponent(keyword));
const html = await response.text(); const html = await response.text();
const regex = /href="([^"]*)"[^>]*>[\s\S]*?<img src="([^"]*)"[\s\S]*?<h3><a[^>]*>([\s\S]*?)<\/a><\/h3>/g; const jsonRegex = /<script id="__NEXT_DATA__" type="application\/json">([\s\S]*?)<\/script>/;
const match = jsonRegex.exec(html);
let match; if (match) {
while ((match = regex.exec(html)) !== null) { const data = JSON.parse(match[1]);
results.push({ const items = data.props?.pageProps?.ssrItems || [];
id: "https://mangabuddy.com" + match[1].trim(), for (const item of items) {
imageURL: "https://passthrough-worker.simplepostrequest.workers.dev/?simple=" + match[2].trim() + "&referer=https://mangabuddy.com", if (item.url && item.name && item.id) {
title: match[3].replace(/<[^>]+>/g, '').trim() results.push({
}); id: "https://mangak.io" + item.url.trim() + " | " + item.id.trim(),
imageURL: "https://passthrough-worker.simplepostrequest.workers.dev/?simple=" + (item.cover || "").trim() + "&referer=https://mangabuddy.com",
title: item.name.trim()
});
}
}
} }
return results; return results;
@@ -23,7 +28,8 @@ async function searchResults(keyword, page=0) {
async function extractDetails(url) { async function extractDetails(url) {
try { try {
const response = await fetch(url); const [urlPart] = url.split(" | ");
const response = await fetch(urlPart);
const html = await response.text(); const html = await response.text();
const descRegex = /<meta name="description" content="([^"]+)"/i; const descRegex = /<meta name="description" content="([^"]+)"/i;
@@ -44,30 +50,28 @@ async function extractDetails(url) {
async function extractChapters(url) { async function extractChapters(url) {
const results = []; const results = [];
try { try {
const response = await fetch(url); const [, titleId] = url.split(" | ");
const html = await response.text(); if (!titleId) return { en: [] };
const idRegex = /var bookId = (\d+);/;
const idMatch = idRegex.exec(html);
if (!idMatch) return { en: [] };
const manga_id = idMatch[1];
const chapUrl = `https://mangabuddy.com/api/manga/${manga_id}/chapters?source=detail`; const chapUrl = `https://api.mangak.io/titles/${titleId.trim()}/chapters`;
const chapResponse = await fetch(chapUrl); const chapResponse = await fetch(chapUrl);
const chapHtml = await chapResponse.text(); const chapJson = await chapResponse.json();
const regex = /<li id="c-\d+">\s*<a href="([^"]*)"[^>]*>\s*<div>\s*<strong class="chapter-title">Chapter (\d+)<\/strong>/g; if (!chapJson.success || !chapJson.data || !chapJson.data.chapters) {
return { en: [] };
}
let match; const chapters = chapJson.data.chapters;
for (const chapter of chapters) {
const match = /(\d+(?:\.\d+)?)/.exec(chapter.name);
const chapterNum = match ? match[1] : String(chapter.chapter_number || 0);
while ((match = regex.exec(chapHtml)) !== null) {
const chapterUrl = "https://mangabuddy.com" + match[1];
const chapterNum = match[2];
results.push([ results.push([
String(chapterNum), String(chapterNum),
[{ [{
id: chapterUrl, id: "https://mangak.io" + chapter.url,
chapter: parseInt(chapterNum), chapter: parseFloat(chapterNum) || 0,
scanlation_group: `Chapter ${chapterNum}` scanlation_group: chapter.name || `Chapter ${chapterNum}`
}] }]
]); ]);
} }
@@ -85,12 +89,22 @@ async function extractImages(url) {
try { try {
const response = await fetch(url); const response = await fetch(url);
const html = await response.text(); const html = await response.text();
const regex = /var chapImages = '([^']*)'/;
const match = regex.exec(html); const jsonRegex = /<script id="__NEXT_DATA__" type="application\/json">([\s\S]*?)<\/script>/;
const match = jsonRegex.exec(html);
if (match) { if (match) {
const images = match[1].split(','); const data = JSON.parse(match[1]);
const images = data.props?.pageProps?.initialChapter?.images || [];
const processedImages = images.map(img => "https://passthrough-worker.simplepostrequest.workers.dev/?simple=" + img.trim() + "&referer=https://mangabuddy.com"); const processedImages = images.map(img => "https://passthrough-worker.simplepostrequest.workers.dev/?simple=" + img.trim() + "&referer=https://mangabuddy.com");
results.push(...processedImages); results.push(...processedImages);
} else {
const regex = /var chapImages = '([^']*)'/;
const legacyMatch = regex.exec(html);
if (legacyMatch) {
const images = legacyMatch[1].split(',');
const processedImages = images.map(img => "https://passthrough-worker.simplepostrequest.workers.dev/?simple=" + img.trim() + "&referer=https://mangabuddy.com");
results.push(...processedImages);
}
} }
return results; return results;
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"sourceName": "MangaBuddy", "sourceName": "MangaBuddy",
"iconURL": "https://mangabuddy.com/static/sites/mangabuddy/icons/apple-touch-icon.png", "iconURL": "https://mangabuddy.com/static/sites/mangabuddy/icons/apple-touch-icon.png",
"version": "1.0", "version": "2.0",
"language": "English", "language": "English",
"scriptURL": "https://git.luna-app.eu/50n50/sources/raw/branch/main/mangabuddy/mangabuddy.js", "scriptURL": "https://git.luna-app.eu/50n50/sources/raw/branch/main/mangabuddy/mangabuddy.js",
"author": { "author": {