Update senshi/senshi.js
This commit is contained in:
+5
-4
@@ -10,7 +10,7 @@ async function searchResults(keyword) {
|
|||||||
results.push({
|
results.push({
|
||||||
title: item.title,
|
title: item.title,
|
||||||
image: "https://senshi.live" + item.anime_picture,
|
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 {
|
try {
|
||||||
const response = await fetchv2("https://senshi.live/anime/" + ID);
|
const response = await fetchv2(url);
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
return JSON.stringify([{
|
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 = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const response = await fetchv2("https://senshi.live/episodes/" + ID, {"Referer": "https://senshi.live/"});
|
const response = await fetchv2("https://senshi.live/episodes/" + ID, {"Referer": "https://senshi.live/"});
|
||||||
|
|||||||
Reference in New Issue
Block a user