forked from 50n50/sources
Update hianime/hianime.js
This commit is contained in:
+6
-3
@@ -144,7 +144,7 @@ async function extractStreamUrl(ID) {
|
||||
const getSourcesUrl = `${defaultDomain}embed-2/v3/e-1/getSources?id=${fileId}&_k=${nonce}`;
|
||||
const getSourcesResp = await fetchv2(getSourcesUrl, headers);
|
||||
const getSourcesJson = await getSourcesResp.json();
|
||||
|
||||
console.log(JSON.stringify(getSourcesJson));
|
||||
const videoUrl = getSourcesJson.sources?.[0]?.file || "";
|
||||
if (!videoUrl) return null;
|
||||
|
||||
@@ -184,10 +184,13 @@ async function extractStreamUrl(ID) {
|
||||
streamUrl: s.streamUrl,
|
||||
headers: s.headers
|
||||
}));
|
||||
|
||||
return JSON.stringify({
|
||||
console.log(JSON.stringify({
|
||||
streams: finalStreams,
|
||||
subtitle: subtitle
|
||||
}));
|
||||
return JSON.stringify({
|
||||
streams: finalStreams,
|
||||
subtitles: subtitle
|
||||
});
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
|
||||
Reference in New Issue
Block a user