Keyoapp: add support for new CDN (#4970)
* Kewn Scans: fix chapter pages * Remove Rudra Scans * Keyoapp: add support for new CDN * Don't bump Kewn Scans twice
This commit is contained in:
parent
a92b59fb3f
commit
9a08636bda
|
@ -2,4 +2,4 @@ plugins {
|
||||||
id("lib-multisrc")
|
id("lib-multisrc")
|
||||||
}
|
}
|
||||||
|
|
||||||
baseVersionCode = 5
|
baseVersionCode = 6
|
||||||
|
|
|
@ -234,15 +234,27 @@ abstract class Keyoapp(
|
||||||
// Image list
|
// Image list
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
|
document.select("#pages > img")
|
||||||
|
.map { it.attr("uid") }
|
||||||
|
.filter { it.isNotEmpty() }
|
||||||
|
.mapIndexed { index, img ->
|
||||||
|
Page(index, document.location(), "$cdnUrl/uploads/$img")
|
||||||
|
}
|
||||||
|
.takeIf { it.isNotEmpty() }
|
||||||
|
?.also { return it }
|
||||||
|
|
||||||
|
// Fallback, old method
|
||||||
return document.select("#pages > img")
|
return document.select("#pages > img")
|
||||||
.map { it.imgAttr() }
|
.map { it.imgAttr() }
|
||||||
.filter { it.contains(imgCdnRegex) }
|
.filter { it.contains(oldImgCdnRegex) }
|
||||||
.mapIndexed { index, img ->
|
.mapIndexed { index, img ->
|
||||||
Page(index, document.location(), img)
|
Page(index, document.location(), img)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private val imgCdnRegex = Regex("""^(https?:)?//cdn\d*\.keyoapp\.com""")
|
protected val cdnUrl = "https://cdn.igniscans.com"
|
||||||
|
|
||||||
|
private val oldImgCdnRegex = Regex("""^(https?:)?//cdn\d*\.keyoapp\.com""")
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document) = ""
|
override fun imageUrlParse(document: Document) = ""
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ ext {
|
||||||
themePkg = 'keyoapp'
|
themePkg = 'keyoapp'
|
||||||
baseUrl = 'https://kewnscans.org'
|
baseUrl = 'https://kewnscans.org'
|
||||||
overrideVersionCode = 1
|
overrideVersionCode = 1
|
||||||
|
isNsfw = false
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -2,21 +2,17 @@ package eu.kanade.tachiyomi.extension.en.magusmanga
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.keyoapp.Keyoapp
|
import eu.kanade.tachiyomi.multisrc.keyoapp.Keyoapp
|
||||||
import eu.kanade.tachiyomi.network.interceptor.rateLimitHost
|
import eu.kanade.tachiyomi.network.interceptor.rateLimitHost
|
||||||
import eu.kanade.tachiyomi.source.model.Page
|
|
||||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||||
import okhttp3.Interceptor
|
import okhttp3.Interceptor
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import okio.IOException
|
import okio.IOException
|
||||||
import org.jsoup.Jsoup
|
import org.jsoup.Jsoup
|
||||||
import org.jsoup.nodes.Document
|
|
||||||
|
|
||||||
class MagusManga : Keyoapp(
|
class MagusManga : Keyoapp(
|
||||||
"Magus Manga",
|
"Magus Manga",
|
||||||
"https://magustoon.com",
|
"https://magustoon.com",
|
||||||
"en",
|
"en",
|
||||||
) {
|
) {
|
||||||
private val cdnUrl = "https://cdn.igniscans.com"
|
|
||||||
|
|
||||||
override val versionId = 2
|
override val versionId = 2
|
||||||
|
|
||||||
override val client = network.cloudflareClient.newBuilder()
|
override val client = network.cloudflareClient.newBuilder()
|
||||||
|
@ -47,12 +43,4 @@ class MagusManga : Keyoapp(
|
||||||
override fun chapterListSelector(): String {
|
override fun chapterListSelector(): String {
|
||||||
return "${super.chapterListSelector()}:not(:has(img[src*=coin]))"
|
return "${super.chapterListSelector()}:not(:has(img[src*=coin]))"
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
|
||||||
return document.select("#pages > img").mapIndexed { idx, img ->
|
|
||||||
val uid = img.attr("uid")
|
|
||||||
|
|
||||||
Page(idx, imageUrl = "$cdnUrl/uploads/$uid")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
ext {
|
|
||||||
extName = 'Rudra Scans'
|
|
||||||
extClass = '.RudraScans'
|
|
||||||
themePkg = 'keyoapp'
|
|
||||||
baseUrl = 'https://rudrascans.com'
|
|
||||||
overrideVersionCode = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
|
Binary file not shown.
Before Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 12 KiB |
Binary file not shown.
Before Width: | Height: | Size: 19 KiB |
|
@ -1,5 +0,0 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.rudrascans
|
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.keyoapp.Keyoapp
|
|
||||||
|
|
||||||
class RudraScans : Keyoapp("Rudra Scans", "https://rudrascans.com", "en")
|
|
Loading…
Reference in New Issue