Fix Asura Scans downloads (#8059)

This commit is contained in:
lord-ne 2021-07-12 06:47:54 -04:00 committed by GitHub
parent f82b4bb69d
commit d4fdd18ea7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -4,6 +4,9 @@ import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.multisrc.wpmangastream.WPMangaStream
import okhttp3.OkHttpClient
import java.util.concurrent.TimeUnit
import org.jsoup.nodes.Document
import eu.kanade.tachiyomi.source.model.Page
class AsuraScans : WPMangaStream("AsuraScans", "https://www.asurascans.com", "en") {
private val rateLimitInterceptor = RateLimitInterceptor(2)
@ -15,4 +18,11 @@ class AsuraScans : WPMangaStream("AsuraScans", "https://www.asurascans.com", "en
.build()
override val pageSelector = "div.rdminimal img[loading*=lazy]"
// Skip scriptPages
override fun pageListParse(document: Document): List<Page> {
return document.select(pageSelector)
.filterNot { it.attr("abs:src").isNullOrEmpty() }
.mapIndexed { i, img -> Page(i, "", img.attr("abs:src")) }
}
}

View File

@ -12,7 +12,7 @@ class WPMangaStreamGenerator : ThemeSourceGenerator {
override val baseVersionCode: Int = 7
override val sources = listOf(
SingleLang("Asura Scans", "https://www.asurascans.com", "en", overrideVersionCode = 1),
SingleLang("Asura Scans", "https://www.asurascans.com", "en", overrideVersionCode = 2),
SingleLang("KlanKomik", "https://klankomik.com", "id", overrideVersionCode = 1),
SingleLang("MasterKomik", "https://masterkomik.com", "id", overrideVersionCode = 1),
SingleLang("Kaisar Komik", "https://kaisarkomik.com", "id", overrideVersionCode = 1),