From da85b27a943606e3035886a7e249caad4a987531 Mon Sep 17 00:00:00 2001 From: Secozzi <49240133+Secozzi@users.noreply.github.com> Date: Thu, 25 Apr 2024 15:42:47 +0000 Subject: [PATCH] update extraction for mangaUrlDirectory (#2535) --- src/en/elarcpage/build.gradle | 2 +- .../kanade/tachiyomi/extension/en/elarcpage/ElarcPage.kt | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/en/elarcpage/build.gradle b/src/en/elarcpage/build.gradle index 8328b619f..1868a2fa7 100644 --- a/src/en/elarcpage/build.gradle +++ b/src/en/elarcpage/build.gradle @@ -3,7 +3,7 @@ ext { extClass = '.ElarcPage' themePkg = 'mangathemesia' baseUrl = 'https://elarctoons.com' - overrideVersionCode = 6 + overrideVersionCode = 7 isNsfw = false } diff --git a/src/en/elarcpage/src/eu/kanade/tachiyomi/extension/en/elarcpage/ElarcPage.kt b/src/en/elarcpage/src/eu/kanade/tachiyomi/extension/en/elarcpage/ElarcPage.kt index 4380c43aa..e2cbfbda4 100644 --- a/src/en/elarcpage/src/eu/kanade/tachiyomi/extension/en/elarcpage/ElarcPage.kt +++ b/src/en/elarcpage/src/eu/kanade/tachiyomi/extension/en/elarcpage/ElarcPage.kt @@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.extension.en.elarcpage import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia import eu.kanade.tachiyomi.network.GET +import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.Interceptor import okhttp3.Response import org.jsoup.Jsoup @@ -63,12 +64,10 @@ class ElarcPage : MangaThemesia( request.url.toString(), ) - document.select("#menu-item-14 > a, a:contains(All Series), #main-menu a, .mm a") - .reversed() - .map { it.attr("href") } - .lastOrNull { it.length >= 2 && it[0] == '/' } + document.selectFirst(".serieslist > ul > li a.series") ?.let { - setMangaUrlDirectory(it) + val mangaUrlDirectory = it.attr("abs:href").toHttpUrl().pathSegments.first() + setMangaUrlDirectory("/$mangaUrlDirectory") dynamicUrlUpdated = timeNow }