mirror of
https://github.com/shafat-96/anicrush-api.git
synced 2026-04-17 15:51:44 +00:00
fix
This commit is contained in:
@@ -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 =
|
||||||
|
|||||||
10
index.js
10
index.js
@@ -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
2
package-lock.json
generated
@@ -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": {
|
||||||
|
|||||||
Reference in New Issue
Block a user