MangaGezgini: fix chapter name, notify on captcha (#2910)
This commit is contained in:
parent
daecf41724
commit
43c934d1f8
|
@ -3,7 +3,8 @@ ext {
|
|||
extClass = '.MangaGezgini'
|
||||
themePkg = 'madara'
|
||||
baseUrl = 'https://mangagezgini.com'
|
||||
overrideVersionCode = 1
|
||||
overrideVersionCode = 2
|
||||
isNsfw = false
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
|
|
@ -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<Page> {
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue