Add Manga Oku TR (#3723)

* Add Manga Oku TR

* fix PR comment
This commit is contained in:
Vetle Ledaal 2024-06-26 13:28:25 +02:00 committed by Draff
parent bd622ff86a
commit 947c34f4c8
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
7 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,10 @@
ext {
extName = 'Manga Oku TR'
extClass = '.MangaOkuTr'
themePkg = 'mangathemesia'
baseUrl = 'https://mangaokutr.com'
overrideVersionCode = 0
isNsfw = false
}
apply from: "$rootDir/common.gradle"

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -0,0 +1,35 @@
package eu.kanade.tachiyomi.extension.tr.mangaokutr
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
import okhttp3.HttpUrl.Companion.toHttpUrl
import okhttp3.Interceptor
import okhttp3.Response
import java.text.SimpleDateFormat
import java.util.Locale
class MangaOkuTr : MangaThemesia(
"Manga Oku TR",
"https://mangaokutr.com",
"tr",
dateFormat = SimpleDateFormat("MMMM d, yyyy", Locale("tr")),
) {
override val client = network.cloudflareClient.newBuilder()
.addInterceptor(::statusCodeInterceptor)
.build()
private fun statusCodeInterceptor(chain: Interceptor.Chain): Response {
val request = chain.request()
val response = chain.proceed(request)
if (response.code != 500) return response
if (response.header("cf-mitigated") != null) return response
if (request.url.host != baseUrl.toHttpUrl().host) return response
// Browse is normally error 500 (???)
return response.newBuilder()
.code(200)
.build()
}
override val seriesTypeSelector = ".tsinfo .imptdt:contains(Tür) a"
override val seriesDescriptionSelector = "h2 + .entry-content > p:not(:contains(Kategoriler: ))"
}