update
This commit is contained in:
+27
-11
@@ -1,7 +1,7 @@
|
||||
async function searchResults(keyword) {
|
||||
const results = [];
|
||||
try {
|
||||
const response = await fetchv2("https://123animes.ru/search?keyword=" + encodeURIComponent(keyword));
|
||||
const response = await fetchv2("https://123animehub.cc/search?keyword=" + encodeURIComponent(keyword));
|
||||
const html = await response.text();
|
||||
|
||||
const filmListMatch = html.match(/<div class="film-list">([\s\S]*?)<div class="clearfix"><\/div>/);
|
||||
@@ -15,8 +15,8 @@ async function searchResults(keyword) {
|
||||
while ((match = itemRegex.exec(filmList)) !== null) {
|
||||
results.push({
|
||||
title: match[2].trim(),
|
||||
image: "https://123animes.ru" + match[3].trim(),
|
||||
href: "https://123animes.ru" + match[1].trim()
|
||||
image: "https://123animehub.cc" + match[3].trim(),
|
||||
href: "https://123animehub.cc" + match[1].trim()
|
||||
});
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ async function extractEpisodes(url) {
|
||||
try {
|
||||
const animeId = url.split('/').pop();
|
||||
|
||||
const response = await fetchv2("https://123animes.ru/ajax/film/sv?id=" + animeId);
|
||||
const response = await fetchv2("https://123animehub.cc/ajax/film/sv?id=" + animeId);
|
||||
const jsonData = await response.json();
|
||||
const html = jsonData.html;
|
||||
|
||||
@@ -111,19 +111,35 @@ async function extractEpisodes(url) {
|
||||
|
||||
async function extractStreamUrl(ID) {
|
||||
try {
|
||||
const response = await fetchv2("https://123animes.ru/ajax/episode/info?epr=" + ID);
|
||||
const response = await fetchv2("https://123animehub.cc/ajax/episode/info?epr=" + encodeURIComponent(ID));
|
||||
const data = await response.json();
|
||||
|
||||
const target = data.target;
|
||||
const streamID = target.split('/').pop();
|
||||
|
||||
const responseTwo = await fetchv2("https://play.shipimagesbolt.online/hs/getSources?id=" + streamID);
|
||||
const dataTwo = await responseTwo.json();
|
||||
if (!target) throw new Error("No target in response: " + JSON.stringify(data));
|
||||
|
||||
const stream = dataTwo.sources;
|
||||
const responseTarget = await fetchv2(target);
|
||||
const htmlTarget = await responseTarget.text();
|
||||
const zrpart2Match = htmlTarget.match(/var\s+zrpart2\s*=\s*'([^']+)';/);
|
||||
if (!zrpart2Match) throw new Error("zrpart2 not found");
|
||||
const zrpart2 = zrpart2Match[1];
|
||||
|
||||
return stream;
|
||||
const originMatch = target.match(/^(https?:\/\/[^\/]+)/);
|
||||
const origin = originMatch ? originMatch[1] : "";
|
||||
|
||||
const hsUrl = `${origin}/hs/${zrpart2}`;
|
||||
const responseHs = await fetchv2(hsUrl);
|
||||
const htmlHs = await responseHs.text();
|
||||
const dataIdMatch = htmlHs.match(/id="mg-player"[^>]*data-id="([^"]+)"/);
|
||||
if (!dataIdMatch) throw new Error("data-id not found");
|
||||
const dataId = dataIdMatch[1];
|
||||
|
||||
const sourcesUrl = `${origin}/hs/getSources?id=${dataId}`;
|
||||
const responseSources = await fetchv2(sourcesUrl);
|
||||
const dataSources = await responseSources.json();
|
||||
|
||||
return dataSources.sources;
|
||||
} catch (err) {
|
||||
console.log("Stream URL Error details:", err.message, err.stack);
|
||||
return "https://error.org/";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"sourceName": "123Anime",
|
||||
"iconUrl": "https://123animes.ru/assets/favicons/apple-touch-icon.png",
|
||||
"iconUrl": "https://123animehub.cc/assets/favicons/apple-touch-icon.png",
|
||||
"author": {
|
||||
"name": "50/50",
|
||||
"icon": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ3122kQwublLkZ6rf1fEpUP79BxZOFmH9BSA&s"
|
||||
},
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"language": "English (DUB/HARDSUB)",
|
||||
"streamType": "HLS",
|
||||
"quality": "1080p",
|
||||
"baseUrl": "https://play.shipimagesbolt.online/",
|
||||
"searchBaseUrl": "https://play.shipimagesbolt.online/",
|
||||
"baseUrl": "https://123animehub.cc/",
|
||||
"searchBaseUrl": "https://123animehub.cc/",
|
||||
"scriptUrl": "https://git.luna-app.eu/50n50/sources/raw/branch/main/123anime/123anime.js",
|
||||
"type": "anime",
|
||||
"asyncJS": true,
|
||||
|
||||
Reference in New Issue
Block a user