]+id="wrapper"[^>]+data-id="(\d+)"[^>]*>/);
if (!idMatch) throw new Error("movie_id not found");
const movieId = idMatch[1];
- const epListResp = await fetchv2(`https://hianime.to/ajax/v2/episode/list/${movieId}`);
+ const epListResp = await fetchv2(`https://aniwatchtv.to/ajax/v2/episode/list/${movieId}`);
const epListJson = await epListResp.json();
const epHtml = epListJson.html;
@@ -93,7 +93,7 @@ async function extractEpisodes(url) {
async function extractStreamUrl(ID) {
try {
- const serversResp = await fetchv2(`https://hianime.to/ajax/v2/episode/servers?episodeId=${ID}`);
+ const serversResp = await fetchv2(`https://aniwatchtv.to/ajax/v2/episode/servers?episodeId=${ID}`);
const serversJson = await serversResp.json();
const serversHtml = serversJson.html;
@@ -110,12 +110,12 @@ async function extractStreamUrl(ID) {
const headers = {
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/146.0",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
- "Referer": "https://hianime.to/"
+ "Referer": "https://aniwatchtv.to/"
};
const processServer = async (serverId, title) => {
try {
- const sourcesResp = await fetchv2(`https://hianime.to/ajax/v2/episode/sources?id=${serverId}`);
+ const sourcesResp = await fetchv2(`https://aniwatchtv.to/ajax/v2/episode/sources?id=${serverId}`);
const sourcesJson = await sourcesResp.json();
const iframeUrl = sourcesJson.link;