forked from 50n50/sources
Upload
This commit is contained in:
+77
@@ -0,0 +1,77 @@
|
||||
async function searchResults(keyword) {
|
||||
const results = [];
|
||||
try {
|
||||
const response = await fetchv2();
|
||||
const html = await response.text();
|
||||
|
||||
let match;
|
||||
while ((match = regex.exec(html)) !== null) {
|
||||
results.push({
|
||||
title: match[3].trim(),
|
||||
image: match[2].trim(),
|
||||
href: 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();
|
||||
|
||||
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();
|
||||
|
||||
let match;
|
||||
while ((match = regex.exec(html)) !== null) {
|
||||
results.push({
|
||||
href: match[1].trim(),
|
||||
number: parseInt(match[2], 10)
|
||||
});
|
||||
}
|
||||
|
||||
return JSON.stringify(results);
|
||||
} catch (err) {
|
||||
return JSON.stringify([{
|
||||
href: "Error",
|
||||
number: "Error"
|
||||
}]);
|
||||
}
|
||||
}
|
||||
|
||||
async function extractStreamUrl(url) {
|
||||
try {
|
||||
const response = await fetchv2(url);
|
||||
const html = await response.text();
|
||||
|
||||
return "https://error.org/";
|
||||
} catch (err) {
|
||||
return "https://error.org/";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"sourceName": "Development",
|
||||
"iconUrl": "https://cdn-icons-png.flaticon.com/512/3953/3953226.png",
|
||||
"author": {
|
||||
"name": "Dev",
|
||||
"icon": "https://cdn-icons-png.flaticon.com/512/3953/3953226.png"
|
||||
},
|
||||
"version": "1.0.0",
|
||||
"language": "Dev",
|
||||
"streamType": "Dev",
|
||||
"quality": "Dev",
|
||||
"baseUrl": "https://google.com/",
|
||||
"searchBaseUrl": "https://google.com/?q=%s",
|
||||
"scriptUrl": "https://gitlab.com/50n50/sources/-/raw/main/dev/dev.js",
|
||||
"asyncJS": true,
|
||||
"type": "anime"
|
||||
}
|
||||
Reference in New Issue
Block a user