mirror of
https://git.luna-app.eu/50n50/sources
synced 2025-12-21 13:16:21 +01:00
Update animenana/animenana.js
This commit is contained in:
parent
4ffc40da02
commit
068d9f4c40
1 changed files with 10 additions and 3 deletions
|
|
@ -1,3 +1,10 @@
|
||||||
|
function cleanTitle(title) {
|
||||||
|
return title
|
||||||
|
.replace(/’/g, "'")
|
||||||
|
.replace(/–/g, "-")
|
||||||
|
.replace(/&#[0-9]+;/g, "");
|
||||||
|
}
|
||||||
|
|
||||||
async function searchResults(keyword) {
|
async function searchResults(keyword) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
|
|
@ -18,7 +25,7 @@ async function searchResults(keyword) {
|
||||||
results.push({
|
results.push({
|
||||||
href: "https://animenana.com" + hrefMatch[1].trim(),
|
href: "https://animenana.com" + hrefMatch[1].trim(),
|
||||||
image: "https://animenana.com" + imgMatch[1].trim(),
|
image: "https://animenana.com" + imgMatch[1].trim(),
|
||||||
title: titleMatch[1].trim()
|
title: cleanTitle(titleMatch[1].trim())
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -37,7 +44,7 @@ async function searchResults(keyword) {
|
||||||
results.push({
|
results.push({
|
||||||
href: "https://animenana.com" + hrefMatch[1].trim(),
|
href: "https://animenana.com" + hrefMatch[1].trim(),
|
||||||
image: "https://animenana.com" + imgMatch[1].trim(),
|
image: "https://animenana.com" + imgMatch[1].trim(),
|
||||||
title: titleMatch[1].trim()
|
title: cleanTitle(titleMatch[1].trim())
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -51,7 +58,7 @@ async function searchResults(keyword) {
|
||||||
results.push({
|
results.push({
|
||||||
href: "https://animenana.com" + match[1].trim(),
|
href: "https://animenana.com" + match[1].trim(),
|
||||||
image: "https://animenana.com" + match[2].trim(),
|
image: "https://animenana.com" + match[2].trim(),
|
||||||
title: match[3].trim()
|
title: cleanTitle(match[3].trim())
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue