Overview
Fetches a list of the episode sources and its tracks for a specific server. This function takes an id
as a parameter. It is required to pass id
to fetch the sources of a server.
Usage
import { Hianime } from "hianime";
async function main() {
const hianime = new Hianime();
// Takes an id as a parameter,
// in the example it is "579601" which is the id of the anime "Attack on Titan" Episode 1
const result = await hianime.getEpisodeSources("579601");
console.log(JSON.stringify(result, null, 2));
}
main();
The id
can be found on each Server
object from the getEpisodeServers()
.
method. You must pass the id
comes from server, not from any other source
object.
Response
{
"sources": [
{
"file": "https://thunderwave48.xyz/_v7/85da27503d497abadce04a6c756a9bfad648451cfea9f39d3c2a584a9ffb45644417f699e0da69cb4f50701ecebb8b1d75d4f37b02dc2eeb0e32a287de765222ad083ea27aa71e7dc61b69b07dccc5558c5451e2ff91642435e5ebc7dbfce30db6a9e2367f75ad4173dac32b5f950b11d5f662e56f75fe72efb3518b4e008b1c/master.m3u8",
"type": "hls"
}
],
"tracks": [
{
"file": "https://megacloudforest.xyz/subtitle/5fbacd492a343a2f30b97d682b61b985/eng-2.vtt",
"label": "English",
"kind": "captions",
"default": true
},
{
"file": "https://megacloudforest.xyz/subtitle/5fbacd492a343a2f30b97d682b61b985/eng-3.vtt",
"label": "English",
"kind": "captions"
},
{
"file": "https://megacloudforest.xyz/subtitle/806a582526a4c5a226514316bd5b6f64/806a582526a4c5a226514316bd5b6f64.vtt",
"label": "English - (Crunchyroll)",
"kind": "captions"
},
{
"file": "https://megacloudforest.xyz/subtitle/5fbacd492a343a2f30b97d682b61b985/por-4.vtt",
"label": "Portuguese",
"kind": "captions"
},
{
"file": "https://megacloudforest.xyz/subtitle/5fbacd492a343a2f30b97d682b61b985/spa-5.vtt",
"label": "Spanish",
"kind": "captions"
},
{
"file": "https://megacloudforest.xyz/thumbnails/9f851301fa0ea7b316599351ccedb423/thumbnails.vtt",
"kind": "thumbnails"
}
],
"encrypted": false,
"intro": {
"start": 138,
"end": 215
},
"outro": {
"start": 1452,
"end": 1542
},
"server": 4,
"headers": {
"Referer": "https://megacloud.blog/"
}
}
Parameters
- Type:
string
- Required:
true
- Description: The unique identifier of the
server