Update animepahe/animepahe.js

This commit is contained in:
aka paul 2026-01-03 20:15:35 +00:00
parent b29f9b9336
commit c76c6ccfb2

View file

@ -74,13 +74,11 @@ async function extractEpisodes(url) {
const lastPage = data1.last_page; const lastPage = data1.last_page;
if (lastPage > 1) { if (lastPage > 1) {
const promises = [];
for (let p = 2; p <= lastPage; p++) { for (let p = 2; p <= lastPage; p++) {
const apiUrl = `https://animepahe.si/api?m=release&id=${id}&sort=episode_asc&page=${p}`; const apiUrl = `https://animepahe.si/api?m=release&id=${id}&sort=episode_asc&page=${p}`;
promises.push(ddosInterceptor.fetchWithBypass(apiUrl).then(response => response.text()).then(text => JSON.parse(text))); const response = await ddosInterceptor.fetchWithBypass(apiUrl);
} const dataText = await response.text();
const datas = await Promise.all(promises); const data = JSON.parse(dataText);
for (const data of datas) {
for (const item of data.data) { for (const item of data.data) {
results.push({ results.push({
href: `https://animepahe.si/play/${id}/${item.session}`, href: `https://animepahe.si/play/${id}/${item.session}`,
@ -154,7 +152,7 @@ async function extractStreamUrl(url) {
streams.push({ streams.push({
title: title, title: title,
streamUrl: hlsUrl, streamUrl: hlsUrl.replace("uwu.m3u8", "owo.m3u8"),
headers: { headers: {
"Referer": "https://kwik.cx/", "Referer": "https://kwik.cx/",
"Origin": "https://kwik.cx" "Origin": "https://kwik.cx"