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
82
ddys/ddys.js
Normal file
82
ddys/ddys.js
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
async function searchResults(keyword) {
|
||||
const searchUrl = `https://ddys.pro/?s=${encodeURIComponent(keyword)}`;
|
||||
try {
|
||||
const response = await fetchv2(searchUrl);
|
||||
const html = await response.text();
|
||||
const results = [];
|
||||
|
||||
const articleRegex = /<article id="post-\d+"[^>]*>[\s\S]*?<h2 class="post-title"><a href="([^"]+)"[^>]*>([^<]+)<\/a><\/h2>/g;
|
||||
let match;
|
||||
|
||||
while ((match = articleRegex.exec(html)) !== null) {
|
||||
const href = match[1].trim();
|
||||
const title = match[2].trim();
|
||||
const imageUrl = "https://i.ibb.co/Y4b38sTG/Search-has-no-images.png";
|
||||
|
||||
results.push({
|
||||
title,
|
||||
image: imageUrl,
|
||||
href
|
||||
});
|
||||
}
|
||||
|
||||
console.log(results);
|
||||
return JSON.stringify(results);
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
async function extractDetails(url) {
|
||||
const response = await fetchv2(url);
|
||||
const html = await response.text();
|
||||
|
||||
const aliasMatch = html.match(/又名:\s*([^<]+)/);
|
||||
const descriptionMatch = html.match(/简介:\s*([\s\S]*?)<\/div>/);
|
||||
const airdateMatch = html.match(/年份:\s*(\d{4})/);
|
||||
|
||||
const alias = aliasMatch ? aliasMatch[1].trim() : "N/A";
|
||||
const description = descriptionMatch ? descriptionMatch[1].trim() : "No description available.";
|
||||
const airdate = airdateMatch ? airdateMatch[1].trim() : "N/A";
|
||||
|
||||
const details = [{
|
||||
alias,
|
||||
description,
|
||||
airdate
|
||||
}];
|
||||
|
||||
console.log(JSON.stringify(details));
|
||||
return JSON.stringify(details);
|
||||
}
|
||||
|
||||
async function extractEpisodes(url) {
|
||||
const response = await fetchv2(url);
|
||||
const html = await response.text();
|
||||
const episodes = [];
|
||||
|
||||
const scriptMatch = html.match(/<script class="wp-playlist-script" type="application\/json">(\{[\s\S]*?\})<\/script>/);
|
||||
|
||||
if (scriptMatch) {
|
||||
const jsonData = JSON.parse(scriptMatch[1]);
|
||||
|
||||
jsonData.tracks.forEach(track => {
|
||||
if (track.src0) {
|
||||
const episodeMatch = track.src0.match(/S01E(\d+)/) || track.caption.match(/\u7b2c(\d+)\u96c6/);
|
||||
const episodeNumber = episodeMatch ? parseInt(episodeMatch[1], 10) : null; // Convert to integer
|
||||
|
||||
episodes.push({
|
||||
href: `https://v.ddys.pro${track.src0.trim()}`,
|
||||
number: episodeNumber
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
console.log(episodes);
|
||||
return JSON.stringify(episodes);
|
||||
}
|
||||
|
||||
|
||||
async function extractStreamUrl(url) {
|
||||
return url;
|
||||
}
|
||||
17
ddys/ddys.json
Normal file
17
ddys/ddys.json
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"sourceName": "DDYS",
|
||||
"iconUrl": "https://ddys.pro/apple-touch-icon.png",
|
||||
"author": {
|
||||
"name": "50/50",
|
||||
"icon": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ3122kQwublLkZ6rf1fEpUP79BxZOFmH9BSA&s"
|
||||
},
|
||||
"version": "1.0.0",
|
||||
"language": "Chinese",
|
||||
"streamType": "mp4",
|
||||
"quality": "1080p",
|
||||
"baseUrl": "https://ddys.pro/",
|
||||
"searchBaseUrl": "https://ddys.pro/?s=%s",
|
||||
"scriptUrl": "https://gitlab.com/50n50/sources/-/raw/main/ddys/ddys.js",
|
||||
"asyncJS": true,
|
||||
"type": "movies/shows"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue