diff --git a/src/tr/mangagezgini/build.gradle b/src/tr/mangagezgini/build.gradle index 2c9c7aeaf..55daecf04 100644 --- a/src/tr/mangagezgini/build.gradle +++ b/src/tr/mangagezgini/build.gradle @@ -3,7 +3,8 @@ ext { extClass = '.MangaGezgini' themePkg = 'madara' baseUrl = 'https://mangagezgini.com' - overrideVersionCode = 1 + overrideVersionCode = 2 + isNsfw = false } apply from: "$rootDir/common.gradle" diff --git a/src/tr/mangagezgini/src/eu/kanade/tachiyomi/extension/tr/mangagezgini/MangaGezgini.kt b/src/tr/mangagezgini/src/eu/kanade/tachiyomi/extension/tr/mangagezgini/MangaGezgini.kt index a5bd7b773..8ac6a3da3 100644 --- a/src/tr/mangagezgini/src/eu/kanade/tachiyomi/extension/tr/mangagezgini/MangaGezgini.kt +++ b/src/tr/mangagezgini/src/eu/kanade/tachiyomi/extension/tr/mangagezgini/MangaGezgini.kt @@ -1,6 +1,11 @@ package eu.kanade.tachiyomi.extension.tr.mangagezgini import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.network.GET +import eu.kanade.tachiyomi.source.model.Page +import eu.kanade.tachiyomi.source.model.SManga +import okhttp3.Request +import org.jsoup.nodes.Document import java.text.SimpleDateFormat import java.util.Locale @@ -10,6 +15,24 @@ class MangaGezgini : Madara( "tr", SimpleDateFormat("MMMM dd, yyyy", Locale("tr")), ) { + override val chapterUrlSelector = "> a" + override val useLoadMoreRequest = LoadMoreStrategy.Never override val useNewChapterEndpoint = true + + private var captchaUrl: String? = null + + override fun mangaDetailsRequest(manga: SManga): Request = + captchaUrl?.let { GET(it, headers) }.also { captchaUrl = null } + ?: super.mangaDetailsRequest(manga) + + override fun pageListParse(document: Document): List { + if (document.selectFirst(".reading-content form, .reading-content input[value=Doğrula]") != null) { + captchaUrl = document.selectFirst(".reading-content form") + ?.attr("abs:action") + ?: "$baseUrl/kontrol/" + throw Exception("WebView'da captcha çözün.") + } + return super.pageListParse(document) + } }