mirror of
https://git.luna-app.eu/50n50/sources
synced 2026-01-04 21:55:31 +01:00
Upload
This commit is contained in:
commit
09c423e95a
276 changed files with 54396 additions and 0 deletions
121
kisscartoon/kisscartoon.js
Normal file
121
kisscartoon/kisscartoon.js
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
async function searchResults(keyword) {
|
||||
const results = [];
|
||||
const regex = /<div title='.*?<img .*?src="(.*?)".*?>.*?<a class="item_movies_link" href="(.*?)">(.*?)<\/a>/gs;
|
||||
|
||||
try {
|
||||
const response = await fetchv2("https://kisscartoon.sh/Search/?s=" + encodeURIComponent(keyword));
|
||||
const html = await response.text();
|
||||
|
||||
let match;
|
||||
while ((match = regex.exec(html)) !== null) {
|
||||
results.push({
|
||||
image: match[1].trim(),
|
||||
href: match[2].trim(),
|
||||
title: match[3].replace(/<.*?>/g, '').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 match = html.match(/<div class="summary">\s*<p>(.*?)<\/p>\s*<\/div>/s);
|
||||
const description = match ? match[1].trim() : "N/A";
|
||||
|
||||
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 = [];
|
||||
|
||||
const regex = /<div>\s*<div>\s*<h3>\s*<a href="(.*?)" title=".*?">/gs;
|
||||
|
||||
const dateRegex = /<div>\s*<div>\s*<h3>.*?<\/h3>\s*<\/div>\s*<div>(.*?)<\/div>/s;
|
||||
|
||||
try {
|
||||
const response = await fetchv2(url);
|
||||
const html = await response.text();
|
||||
|
||||
let match;
|
||||
let count = 1;
|
||||
while ((match = regex.exec(html)) !== null) {
|
||||
results.push({
|
||||
href: match[1].trim(),
|
||||
number: count++
|
||||
});
|
||||
}
|
||||
|
||||
return JSON.stringify(results);
|
||||
} catch (err) {
|
||||
return JSON.stringify([{
|
||||
href: "Error",
|
||||
number: "Error",
|
||||
airdate: "Error"
|
||||
}]);
|
||||
}
|
||||
}
|
||||
|
||||
async function extractStreamUrl(url) {
|
||||
try {
|
||||
const idMatch = url.match(/id=(\d+)/);
|
||||
const id = idMatch ? idMatch[1] : null;
|
||||
|
||||
const headers = {
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
'Referer': url,
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'
|
||||
};
|
||||
|
||||
const postData = `episode_id=${id}`;
|
||||
const response = await fetchv2("https://kisscartoon.sh/ajax/anime/load_episodes_v2?s=tserver", headers, 'POST', postData);
|
||||
const json = await response.json();
|
||||
|
||||
const iframeMatch = json.value.match(/<iframe .*?src="(.*?)"/);
|
||||
const iframeSrc = iframeMatch ? iframeMatch[1] : null;
|
||||
|
||||
if (!iframeSrc) return "https://error.org/";
|
||||
|
||||
const headers2 = {
|
||||
'Referer': "https://kisscartoon.sh",
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'
|
||||
};
|
||||
const iframeResponse = await fetchv2(iframeSrc, headers2);
|
||||
const iframeHtml = await iframeResponse.text();
|
||||
|
||||
const sourcesMatch = iframeHtml.match(/sources:\s*(\[\{.*?\}\])/s);
|
||||
if (!sourcesMatch) return "https://error.org/";
|
||||
|
||||
const sources = JSON.parse(sourcesMatch[1]);
|
||||
const fileUrl = sources.length > 0 ? sources[0].file : null;
|
||||
|
||||
return fileUrl || "https://error.org/";
|
||||
} catch (err) {
|
||||
return "https://error.org/";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
20
kisscartoon/kisscartoon.json
Normal file
20
kisscartoon/kisscartoon.json
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"sourceName": "KissCartoon",
|
||||
"iconUrl": "https://files.catbox.moe/ajv0go.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://kisscartoon.sh/",
|
||||
"searchBaseUrl": "https://kisscartoon.sh/",
|
||||
"scriptUrl": "https://gitlab.com/50n50/sources/-/raw/main/kisscartoon/kisscartoon.js",
|
||||
"type": "shows/movies",
|
||||
"asyncJS": true,
|
||||
"softsub": false,
|
||||
"downloadSupport": false,
|
||||
"note": "Only works with nPlayer: https://nplayer.com/"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue