1st Kiss: fix image attr (#17538)

1stKiss: fix image attr
This commit is contained in:
AwkwardPeak7 2023-08-16 23:54:56 +05:00 committed by GitHub
parent b3b8c15bb0
commit 61383e923a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.extension.en.firstkissmanga
import eu.kanade.tachiyomi.multisrc.madara.Madara import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.network.interceptor.rateLimit import eu.kanade.tachiyomi.network.interceptor.rateLimit
import org.jsoup.nodes.Element
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
class FirstKissManga : Madara( class FirstKissManga : Madara(
@ -12,4 +13,19 @@ class FirstKissManga : Madara(
override val client = super.client.newBuilder() override val client = super.client.newBuilder()
.rateLimit(1, 3, TimeUnit.SECONDS) .rateLimit(1, 3, TimeUnit.SECONDS)
.build() .build()
override fun searchPage(page: Int): String {
return if (page > 1) {
"page/$page/"
} else {
""
}
}
override fun imageFromElement(element: Element): String? {
return when {
element.hasAttr("data-cfsrc") -> element.attr("abs:data-cfsrc")
else -> super.imageFromElement(element)
}?.trim()
}
} }

View File

@ -18,7 +18,7 @@ class MadaraGenerator : ThemeSourceGenerator {
MultiLang("MangaForFree.net", "https://mangaforfree.net", listOf("en", "ko", "all"), isNsfw = true, className = "MangaForFreeFactory", pkgName = "mangaforfree", overrideVersionCode = 1), MultiLang("MangaForFree.net", "https://mangaforfree.net", listOf("en", "ko", "all"), isNsfw = true, className = "MangaForFreeFactory", pkgName = "mangaforfree", overrideVersionCode = 1),
MultiLang("Manhwa18.cc", "https://manhwa18.cc", listOf("en", "ko", "all"), isNsfw = true, className = "Manhwa18CcFactory", pkgName = "manhwa18cc", overrideVersionCode = 4), MultiLang("Manhwa18.cc", "https://manhwa18.cc", listOf("en", "ko", "all"), isNsfw = true, className = "Manhwa18CcFactory", pkgName = "manhwa18cc", overrideVersionCode = 4),
MultiLang("Reaper Scans", "https://reaperscans.com", listOf("fr", "tr"), className = "ReaperScansFactory", pkgName = "reaperscans", overrideVersionCode = 12), MultiLang("Reaper Scans", "https://reaperscans.com", listOf("fr", "tr"), className = "ReaperScansFactory", pkgName = "reaperscans", overrideVersionCode = 12),
SingleLang("1st Kiss", "https://1stkissmanga.me", "en", className = "FirstKissManga", pkgName = "firstkissmanga", overrideVersionCode = 9), SingleLang("1st Kiss", "https://1stkissmanga.me", "en", className = "FirstKissManga", pkgName = "firstkissmanga", overrideVersionCode = 10),
SingleLang("1stKissManga.Club", "https://1stkissmanga.club", "en", className = "FirstKissMangaClub", overrideVersionCode = 2), SingleLang("1stKissManga.Club", "https://1stkissmanga.club", "en", className = "FirstKissMangaClub", overrideVersionCode = 2),
SingleLang("247Manga", "https://247manga.com", "en", className = "Manga247", overrideVersionCode = 1), SingleLang("247Manga", "https://247manga.com", "en", className = "Manga247", overrideVersionCode = 1),
SingleLang("365Manga", "https://365manga.com", "en", className = "ThreeSixtyFiveManga", overrideVersionCode = 1), SingleLang("365Manga", "https://365manga.com", "en", className = "ThreeSixtyFiveManga", overrideVersionCode = 1),