mirror of
https://git.luna-app.eu/50n50/sources
synced 2026-01-12 01:18:11 +01:00
Update animepahe/animepahe.js
This commit is contained in:
parent
b29f9b9336
commit
c76c6ccfb2
1 changed files with 4 additions and 6 deletions
|
|
@ -74,13 +74,11 @@ async function extractEpisodes(url) {
|
|||
|
||||
const lastPage = data1.last_page;
|
||||
if (lastPage > 1) {
|
||||
const promises = [];
|
||||
for (let p = 2; p <= lastPage; 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 datas = await Promise.all(promises);
|
||||
for (const data of datas) {
|
||||
const response = await ddosInterceptor.fetchWithBypass(apiUrl);
|
||||
const dataText = await response.text();
|
||||
const data = JSON.parse(dataText);
|
||||
for (const item of data.data) {
|
||||
results.push({
|
||||
href: `https://animepahe.si/play/${id}/${item.session}`,
|
||||
|
|
@ -154,7 +152,7 @@ async function extractStreamUrl(url) {
|
|||
|
||||
streams.push({
|
||||
title: title,
|
||||
streamUrl: hlsUrl,
|
||||
streamUrl: hlsUrl.replace("uwu.m3u8", "owo.m3u8"),
|
||||
headers: {
|
||||
"Referer": "https://kwik.cx/",
|
||||
"Origin": "https://kwik.cx"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue