fixed Animixplay rec again

This commit is contained in:
hexated 2022-10-01 02:11:28 +07:00
parent 34bdc2b0ba
commit 5fd96988c3
1 changed files with 2 additions and 2 deletions

View File

@ -151,7 +151,7 @@ class Animixplay : MainAPI() {
override suspend fun load(url: String): LoadResponse? { override suspend fun load(url: String): LoadResponse? {
val (fixUrl, malId) = if (url.contains("/anime/")) { val (fixUrl, malId) = if (url.contains("/anime/")) {
listOf(url, Regex("anime/([0-9]+)/").find(url)?.groupValues?.get(1)) listOf(url, Regex("anime/([0-9]+)/?").find(url)?.groupValues?.get(1))
} else { } else {
val malId = app.get(url).text.substringAfterLast("malid = '").substringBefore("';") val malId = app.get(url).text.substringAfterLast("malid = '").substringBefore("';")
listOf("$mainUrl/anime/$malId", malId) listOf("$mainUrl/anime/$malId", malId)
@ -191,7 +191,7 @@ class Animixplay : MainAPI() {
.parsedSafe<RecResult>()?.recommendations?.mapNotNull { rec -> .parsedSafe<RecResult>()?.recommendations?.mapNotNull { rec ->
newAnimeSearchResponse( newAnimeSearchResponse(
rec.title ?: return@mapNotNull null, rec.title ?: return@mapNotNull null,
"$mainUrl/anime/${rec.malId}", "$mainUrl/anime/${rec.malId}/",
TvType.Anime TvType.Anime
) { ) {
this.posterUrl = rec.imageUrl this.posterUrl = rec.imageUrl