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;
|
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"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue