FMReader: fix KissLove and Manga-TR (#5710)
This commit is contained in:
parent
0ce4416f09
commit
975b311637
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'FMReader (multiple aggregators)'
|
||||
pkgNameSuffix = 'all.fmreader'
|
||||
extClass = '.FMReaderFactory'
|
||||
extVersionCode = 27
|
||||
extVersionCode = 28
|
||||
libVersion = '1.2'
|
||||
containsNsfw = true
|
||||
}
|
||||
|
|
|
@ -279,10 +279,13 @@ abstract class FMReader(
|
|||
protected fun base64PageListParse(document: Document): List<Page> {
|
||||
fun Element.decoded(): String {
|
||||
val attr =
|
||||
if (this.hasAttr("data-original")) "data-original"
|
||||
else if (this.hasAttr("data-src")) "data-src"
|
||||
else if (this.hasAttr("data-srcset")) "data-srcset"
|
||||
else "src"
|
||||
when {
|
||||
this.hasAttr("data-original") -> "data-original"
|
||||
this.hasAttr("data-src") -> "data-src"
|
||||
this.hasAttr("data-srcset") -> "data-srcset"
|
||||
this.hasAttr("data-aload") -> "data-aload"
|
||||
else -> "src"
|
||||
}
|
||||
return if (!this.attr(attr).contains(".")) {
|
||||
Base64.decode(this.attr(attr), Base64.DEFAULT).toString(Charset.defaultCharset())
|
||||
} else {
|
||||
|
|
|
@ -12,6 +12,7 @@ import eu.kanade.tachiyomi.source.model.SChapter
|
|||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import okhttp3.FormBody
|
||||
import okhttp3.Headers
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
|
@ -106,6 +107,9 @@ class EighteenLHPlus : FMReader("18LHPlus", "https://18lhplus.com", "en") {
|
|||
}
|
||||
|
||||
class MangaTR : FMReader("Manga-TR", "https://manga-tr.com", "tr") {
|
||||
override fun headersBuilder() = Headers.Builder().apply {
|
||||
add("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64)")
|
||||
}
|
||||
override fun popularMangaNextPageSelector() = "div.btn-group:not(div.btn-block) button.btn-info"
|
||||
// TODO: genre search possible but a bit of a pain
|
||||
override fun getFilterList() = FilterList()
|
||||
|
|
Loading…
Reference in New Issue