diff --git a/src/all/fmreader/build.gradle b/src/all/fmreader/build.gradle index 5dc5b4fdf..59b373b9e 100644 --- a/src/all/fmreader/build.gradle +++ b/src/all/fmreader/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'FMReader (multiple aggregators)' pkgNameSuffix = 'all.fmreader' extClass = '.FMReaderFactory' - extVersionCode = 27 + extVersionCode = 28 libVersion = '1.2' containsNsfw = true } diff --git a/src/all/fmreader/src/eu/kanade/tachiyomi/extension/all/fmreader/FMReader.kt b/src/all/fmreader/src/eu/kanade/tachiyomi/extension/all/fmreader/FMReader.kt index e23470a57..4473eadb6 100644 --- a/src/all/fmreader/src/eu/kanade/tachiyomi/extension/all/fmreader/FMReader.kt +++ b/src/all/fmreader/src/eu/kanade/tachiyomi/extension/all/fmreader/FMReader.kt @@ -279,10 +279,13 @@ abstract class FMReader( protected fun base64PageListParse(document: Document): List { 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 { diff --git a/src/all/fmreader/src/eu/kanade/tachiyomi/extension/all/fmreader/FMReaderFactory.kt b/src/all/fmreader/src/eu/kanade/tachiyomi/extension/all/fmreader/FMReaderFactory.kt index 345aaecfb..98140c03b 100644 --- a/src/all/fmreader/src/eu/kanade/tachiyomi/extension/all/fmreader/FMReaderFactory.kt +++ b/src/all/fmreader/src/eu/kanade/tachiyomi/extension/all/fmreader/FMReaderFactory.kt @@ -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()