mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-25 03:33:24 +01:00
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
2e333291b8
commit
dcbeb4b783
@ -2,4 +2,4 @@ plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 5
|
||||
baseVersionCode = 6
|
||||
|
@ -234,15 +234,27 @@ abstract class Keyoapp(
|
||||
// Image list
|
||||
|
||||
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")
|
||||
.map { it.imgAttr() }
|
||||
.filter { it.contains(imgCdnRegex) }
|
||||
.filter { it.contains(oldImgCdnRegex) }
|
||||
.mapIndexed { index, 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) = ""
|
||||
|
||||
|
@ -4,6 +4,7 @@ ext {
|
||||
themePkg = 'keyoapp'
|
||||
baseUrl = 'https://kewnscans.org'
|
||||
overrideVersionCode = 1
|
||||
isNsfw = false
|
||||
}
|
||||
|
||||
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.network.interceptor.rateLimitHost
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||
import okhttp3.Interceptor
|
||||
import okhttp3.Response
|
||||
import okio.IOException
|
||||
import org.jsoup.Jsoup
|
||||
import org.jsoup.nodes.Document
|
||||
|
||||
class MagusManga : Keyoapp(
|
||||
"Magus Manga",
|
||||
"https://magustoon.com",
|
||||
"en",
|
||||
) {
|
||||
private val cdnUrl = "https://cdn.igniscans.com"
|
||||
|
||||
override val versionId = 2
|
||||
|
||||
override val client = network.cloudflareClient.newBuilder()
|
||||
@ -47,12 +43,4 @@ class MagusManga : Keyoapp(
|
||||
override fun chapterListSelector(): String {
|
||||
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
Block a user