diff --git a/src/en/weebcentral/build.gradle b/src/en/weebcentral/build.gradle index ba95375e5..f07e2bed9 100644 --- a/src/en/weebcentral/build.gradle +++ b/src/en/weebcentral/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'Weeb Central' extClass = '.WeebCentral' - extVersionCode = 2 + extVersionCode = 3 isNsfw = true } diff --git a/src/en/weebcentral/src/eu/kanade/tachiyomi/extension/en/weebcentral/WeebCentral.kt b/src/en/weebcentral/src/eu/kanade/tachiyomi/extension/en/weebcentral/WeebCentral.kt index 2ec69c123..26a0eafef 100644 --- a/src/en/weebcentral/src/eu/kanade/tachiyomi/extension/en/weebcentral/WeebCentral.kt +++ b/src/en/weebcentral/src/eu/kanade/tachiyomi/extension/en/weebcentral/WeebCentral.kt @@ -8,6 +8,7 @@ import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.online.ParsedHttpSource import okhttp3.HttpUrl.Companion.toHttpUrl +import okhttp3.HttpUrl.Companion.toHttpUrlOrNull import okhttp3.Request import org.jsoup.nodes.Document import org.jsoup.nodes.Element @@ -150,6 +151,21 @@ class WeebCentral : ParsedHttpSource() { } // =============================== Pages ================================ + override fun pageListRequest(chapter: SChapter): Request { + val newUrl = (baseUrl + chapter.url) + .toHttpUrlOrNull() + ?.newBuilder() + ?.addPathSegment("images") + ?.addQueryParameter("is_prev", "False") + ?.addQueryParameter("reading_style", "long_strip") + ?.build() + ?.toString() + ?: chapter.url + + chapter.setUrlWithoutDomain(newUrl) + return super.pageListRequest(chapter) + } + override fun pageListParse(document: Document): List { return document.select("section[x-data~=scroll] > img").mapIndexed { index, element -> Page(index, imageUrl = element.attr("abs:src"))