diff --git a/senshi/senshi.js b/senshi/senshi.js index 466b90d..5619dff 100644 --- a/senshi/senshi.js +++ b/senshi/senshi.js @@ -10,7 +10,7 @@ async function searchResults(keyword) { results.push({ title: item.title, image: "https://senshi.live" + item.anime_picture, - href: item.id + href: "https://senshi.live/anime/" + item.id }); } } @@ -25,9 +25,9 @@ async function searchResults(keyword) { } } -async function extractDetails(ID) { +async function extractDetails(url) { try { - const response = await fetchv2("https://senshi.live/anime/" + ID); + const response = await fetchv2(url); const data = await response.json(); return JSON.stringify([{ @@ -44,7 +44,8 @@ async function extractDetails(ID) { } } -async function extractEpisodes(ID) { +async function extractEpisodes(url) { + const ID = url.split("/").pop(); const results = []; try { const response = await fetchv2("https://senshi.live/episodes/" + ID, {"Referer": "https://senshi.live/"});