From c2961179467b22179029a7d2527923385cc05636 Mon Sep 17 00:00:00 2001 From: scb261 <65343233+scb261@users.noreply.github.com> Date: Sun, 28 Mar 2021 14:11:51 +0300 Subject: [PATCH] xCaliBR Scans: fix pages, use https (#6318) --- .../wpmangastream/xcalibrscans/src/xCaliBRScans.kt | 9 ++++++++- .../multisrc/wpmangastream/WPMangaStreamGenerator.kt | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/multisrc/overrides/wpmangastream/xcalibrscans/src/xCaliBRScans.kt b/multisrc/overrides/wpmangastream/xcalibrscans/src/xCaliBRScans.kt index 08617e18f..534c97a6e 100644 --- a/multisrc/overrides/wpmangastream/xcalibrscans/src/xCaliBRScans.kt +++ b/multisrc/overrides/wpmangastream/xcalibrscans/src/xCaliBRScans.kt @@ -2,10 +2,12 @@ package eu.kanade.tachiyomi.extension.en.xcalibrscans import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor import eu.kanade.tachiyomi.multisrc.wpmangastream.WPMangaStream +import eu.kanade.tachiyomi.source.model.Page import okhttp3.OkHttpClient +import org.jsoup.nodes.Document import java.util.concurrent.TimeUnit -class xCaliBRScans : WPMangaStream("xCaliBR Scans", "http://xcalibrscans.com", "en") { +class xCaliBRScans : WPMangaStream("xCaliBR Scans", "https://xcalibrscans.com", "en") { private val rateLimitInterceptor = RateLimitInterceptor(2) override val client: OkHttpClient = network.cloudflareClient.newBuilder() @@ -14,4 +16,9 @@ class xCaliBRScans : WPMangaStream("xCaliBR Scans", "http://xcalibrscans.com", " .addNetworkInterceptor(rateLimitInterceptor) .build() + override fun pageListParse(document: Document): List { + return document.select(pageSelector) + .mapIndexed { i, img -> Page(i, "", img.attr("data-src")) } + } + } diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangastream/WPMangaStreamGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangastream/WPMangaStreamGenerator.kt index a6f7fbad8..c9e5fc107 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangastream/WPMangaStreamGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/wpmangastream/WPMangaStreamGenerator.kt @@ -45,7 +45,7 @@ class WPMangaStreamGenerator : ThemeSourceGenerator { SingleLang("Silence Scan", "https://silencescan.net", "pt-BR"), SingleLang("Kuma Scans (Kuma Translation)", "https://kumascans.com", "en", className = "KumaScans"), SingleLang("Tempest Manga", "https://manga.tempestfansub.com", "tr"), - SingleLang("xCaliBR Scans", "http://xcalibrscans.com", "en"), + SingleLang("xCaliBR Scans", "https://xcalibrscans.com", "en", overrideVersionCode = 1), SingleLang("NoxSubs", "https://noxsubs.com", "tr"), SingleLang("World Romance Translation", "https://wrt.my.id/", "id", overrideVersionCode = 1), SingleLang("The Apollo Team", "https://theapollo.team", "en"),