This commit is contained in:
shafat-96
2026-04-07 22:31:34 +06:00
parent ea22c694eb
commit 37c45e59ae
3 changed files with 10 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
const axios = require("axios"); const axios = require("axios");
const MEGACLOUD_URL = "https://megacloud.blog"; const MEGACLOUD_URL = "https://megacloud.tv";
const KEY_URL = const KEY_URL =
"https://raw.githubusercontent.com/yogesh-hacker/MegacloudKeys/refs/heads/main/keys.json"; "https://raw.githubusercontent.com/yogesh-hacker/MegacloudKeys/refs/heads/main/keys.json";
const DECODE_URL = const DECODE_URL =

View File

@@ -225,7 +225,10 @@ app.get('/api/anime/hls/:movieId', async (req, res) => {
return res.status(404).json({ error: 'Embed link not found' }); return res.status(404).json({ error: 'Embed link not found' });
} }
const embedUrl = embedResponse.data.result.link; let embedUrl = embedResponse.data.result.link;
// Convert .blog to .tv domain
embedUrl = embedUrl.replace(/\.blog/g, '.tv');
// Get HLS link from embed URL // Get HLS link from embed URL
const hlsData = await getHlsLink(embedUrl); const hlsData = await getHlsLink(embedUrl);
@@ -277,7 +280,10 @@ app.get('/api/anime/:anilistId/:episodeNum', async (req, res) => {
return res.status(404).json({ error: 'Embed link not found' }); return res.status(404).json({ error: 'Embed link not found' });
} }
const embedUrl = embedResponse.data.result.link; let embedUrl = embedResponse.data.result.link;
// Convert .blog to .tv domain
embedUrl = embedUrl.replace(/\.blog/g, '.tv');
// Get HLS link from embed URL // Get HLS link from embed URL
const hlsData = await getHlsLink(embedUrl); const hlsData = await getHlsLink(embedUrl);

2
package-lock.json generated
View File

@@ -20,7 +20,7 @@
"nodemon": "^3.0.2" "nodemon": "^3.0.2"
}, },
"engines": { "engines": {
"node": "18.x" "node": "24.x"
} }
}, },
"node_modules/accepts": { "node_modules/accepts": {