Update anime/anicrush/source.js
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class AniCrush {
|
||||
constructor() {
|
||||
this.type = "anime-streaming";
|
||||
this.version = "1.0.0";
|
||||
this.version = "1.0.1";
|
||||
this.baseUrl = "https://anicrush.to";
|
||||
this.apiBase = "https://api.anicrush.to";
|
||||
}
|
||||
@@ -68,8 +68,18 @@ class AniCrush {
|
||||
return q || {};
|
||||
}
|
||||
|
||||
_stripYearHints(raw) {
|
||||
const s = this._safeStr(raw).trim();
|
||||
if (!s) return "";
|
||||
return s
|
||||
.replace(/\((?:19|20)\d{2}\)/g, " ")
|
||||
.replace(/\b(?:19|20)\d{2}\b/g, " ")
|
||||
.replace(/\s+/g, " ")
|
||||
.trim();
|
||||
}
|
||||
|
||||
_normalize(title) {
|
||||
return (this._safeStr(title))
|
||||
return (this._safeStr(this._stripYearHints(title)))
|
||||
.toLowerCase()
|
||||
.replace(/(season|cour|part)/g, "")
|
||||
.replace(/\d+(st|nd|rd|th)/g, (m) => m.replace(/st|nd|rd|th/, ""))
|
||||
@@ -78,7 +88,7 @@ class AniCrush {
|
||||
}
|
||||
|
||||
_normalizeTitle(title) {
|
||||
return (this._safeStr(title))
|
||||
return (this._safeStr(this._stripYearHints(title)))
|
||||
.toLowerCase()
|
||||
.replace(/(season|cour|part|uncensored)/g, "")
|
||||
.replace(/\d+(st|nd|rd|th)/g, (m) => m.replace(/st|nd|rd|th/, ""))
|
||||
|
||||
Reference in New Issue
Block a user