mirror of
https://git.luna-app.eu/50n50/sources
synced 2025-12-22 05:36:32 +01:00
Update ashi/ashi.js
This commit is contained in:
parent
7a9d4f46b1
commit
dfbf63eb10
1 changed files with 16 additions and 10 deletions
26
ashi/ashi.js
26
ashi/ashi.js
|
|
@ -542,13 +542,14 @@ async function extractStreamUrl(url) {
|
|||
|
||||
const streams = [];
|
||||
|
||||
const subStream = decryptedSub ? await getStream(decryptedSub.replace("megaup22", "megaup.site")) : null;
|
||||
const [subStream, dubStream, rawStream] = await Promise.all([
|
||||
decryptedSub ? getStream(decryptedSub) : Promise.resolve(null),
|
||||
decryptedDub ? getStream(decryptedDub) : Promise.resolve(null),
|
||||
decryptedRaw ? getStream(decryptedRaw) : Promise.resolve(null)
|
||||
]);
|
||||
|
||||
if (subStream) streams.push("Hardsub English", subStream);
|
||||
|
||||
const dubStream = decryptedDub ? await getStream(decryptedDub.replace("megaup22", "megaup.site")) : null;
|
||||
if (dubStream) streams.push("Dubbed English", dubStream);
|
||||
|
||||
const rawStream = decryptedRaw ? await getStream(decryptedRaw.replace("megaup22", "megaup.site")) : null;
|
||||
if (rawStream) streams.push("Original audio", rawStream);
|
||||
|
||||
const final = {
|
||||
|
|
@ -666,14 +667,19 @@ async function extractStreamUrl(url) {
|
|||
"Useragent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"
|
||||
};
|
||||
|
||||
const finalResponse = await fetchv2("https://ilovekai.simplepostrequest.workers.dev/iloveass", {}, "POST", JSON.stringify(postData));
|
||||
const finalJson = await finalResponse.json();
|
||||
const [finalJson, m3u8Text] = await Promise.all([
|
||||
fetchv2("https://ilovekai.simplepostrequest.workers.dev/iloveass", {}, "POST", JSON.stringify(postData)).then(r => r.json()),
|
||||
(async () => {
|
||||
const finalResponse = await fetchv2("https://ilovekai.simplepostrequest.workers.dev/iloveass", {}, "POST", JSON.stringify(postData));
|
||||
const finalJson = await finalResponse.json();
|
||||
const m3u8Link = finalJson?.result?.sources?.[0]?.file;
|
||||
const m3u8Response = await fetchv2(m3u8Link);
|
||||
return m3u8Response.text();
|
||||
})()
|
||||
]);
|
||||
|
||||
const m3u8Link = finalJson?.result?.sources?.[0]?.file;
|
||||
|
||||
const m3u8Response = await fetchv2(m3u8Link);
|
||||
const m3u8Text = await m3u8Response.text();
|
||||
|
||||
const baseUrl = m3u8Link.substring(0, m3u8Link.lastIndexOf('/') + 1);
|
||||
|
||||
const streams = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue