Update hianime/hianime.js

This commit is contained in:
aka paul 2025-12-06 22:49:19 +00:00
parent aa6d807f45
commit 9c5c484e1a

View file

@ -144,7 +144,7 @@ async function extractStreamUrl(ID) {
const getSourcesUrl = `${defaultDomain}embed-2/v3/e-1/getSources?id=${fileId}&_k=${nonce}`; const getSourcesUrl = `${defaultDomain}embed-2/v3/e-1/getSources?id=${fileId}&_k=${nonce}`;
const getSourcesResp = await fetchv2(getSourcesUrl, headers); const getSourcesResp = await fetchv2(getSourcesUrl, headers);
const getSourcesJson = await getSourcesResp.json(); const getSourcesJson = await getSourcesResp.json();
console.log(JSON.stringify(getSourcesJson));
const videoUrl = getSourcesJson.sources?.[0]?.file || ""; const videoUrl = getSourcesJson.sources?.[0]?.file || "";
if (!videoUrl) return null; if (!videoUrl) return null;
@ -184,10 +184,13 @@ async function extractStreamUrl(ID) {
streamUrl: s.streamUrl, streamUrl: s.streamUrl,
headers: s.headers headers: s.headers
})); }));
console.log(JSON.stringify({
return JSON.stringify({
streams: finalStreams, streams: finalStreams,
subtitle: subtitle subtitle: subtitle
}));
return JSON.stringify({
streams: finalStreams,
subtitles: subtitle
}); });
} catch (err) { } catch (err) {
console.error(err); console.error(err);