mirror of
https://git.luna-app.eu/50n50/sources
synced 2025-12-21 21:26:19 +01:00
Update mapple/mapple.js
This commit is contained in:
parent
0e7f4fdf7e
commit
40dab1cbac
1 changed files with 14 additions and 2 deletions
|
|
@ -190,6 +190,18 @@ async function extractEpisodes(url) {
|
|||
}
|
||||
|
||||
async function extractStreamUrl(ID) {
|
||||
const chunkResponse = await soraFetch(atob("aHR0cHM6Ly9tYXBwbGUudWsvX25leHQvc3RhdGljL2NodW5rcy8yODk3LWE0ZTFmMDFkYmE5ZDRkMzcuanM="));
|
||||
const chunkText = await chunkResponse.text();
|
||||
|
||||
const actionMatch = chunkText.match(/createServerReference\)\("([a-f0-9]{40,})"[^"]*"getStreamUrl/);
|
||||
const actionIdentifier = actionMatch ? actionMatch[1] : null;
|
||||
|
||||
if (!actionIdentifier) {
|
||||
throw new Error("Failed to extract action identifier from chunk file");
|
||||
}
|
||||
|
||||
console.log("Action Identifier: " + actionIdentifier);
|
||||
|
||||
const sessionResponse = await soraFetch("https://enc-dec.app/api/enc-mapple");
|
||||
const sessionData = await sessionResponse.json();
|
||||
console.log("Session Data: " + JSON.stringify(sessionData));
|
||||
|
|
@ -200,7 +212,7 @@ async function extractStreamUrl(ID) {
|
|||
const tmdbID = match ? match[1] : '';
|
||||
const headers = {
|
||||
"Content-Type": "text/plain",
|
||||
"next-action": "4067783bff09863112a9a148953f77cd8fa3d8d72a"
|
||||
"next-action": actionIdentifier
|
||||
};
|
||||
const postData = `[{"mediaId":${tmdbID},"mediaType":"movie","tv_slug":"","source":"mapple","useFallbackVideo":false,"sessionId":"${sessionID}"}]`;
|
||||
const response = await fetchv2("https://mapple.uk/watch/"+ ID, headers, "POST", postData);
|
||||
|
|
@ -255,7 +267,7 @@ async function extractStreamUrl(ID) {
|
|||
|
||||
const headers = {
|
||||
"Content-Type": "text/plain",
|
||||
"next-action": "4067783bff09863112a9a148953f77cd8fa3d8d72a"
|
||||
"next-action": actionIdentifier
|
||||
};
|
||||
const postData = `[{"mediaId":${tmdbID},"mediaType":"tv","tv_slug":"${seasonNumber}-${episodeNumber}","source":"mapple","useFallbackVideo":false,"sessionId":"${sessionID}"}]`;
|
||||
const response = await fetchv2("https://mapple.uk/watch/"+ ID, headers, "POST", postData);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue