parent
ac53bd65ff
commit
971007cde7
|
@ -3,7 +3,7 @@ ext {
|
||||||
extClass = '.YuriMoonSub'
|
extClass = '.YuriMoonSub'
|
||||||
themePkg = 'zeistmanga'
|
themePkg = 'zeistmanga'
|
||||||
baseUrl = 'https://yurimoonsub.blogspot.com'
|
baseUrl = 'https://yurimoonsub.blogspot.com'
|
||||||
overrideVersionCode = 0
|
overrideVersionCode = 1
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,30 @@ package eu.kanade.tachiyomi.extension.ar.yurimoonsub
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga
|
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga
|
||||||
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||||
|
import org.jsoup.nodes.Document
|
||||||
|
import java.net.URLDecoder
|
||||||
|
import java.nio.charset.StandardCharsets
|
||||||
|
|
||||||
class YuriMoonSub : ZeistManga("Yuri Moon Sub", "https://yurimoonsub.blogspot.com", "ar") {
|
class YuriMoonSub : ZeistManga(
|
||||||
|
"Yuri Moon Sub",
|
||||||
|
"https://yurimoonsub.blogspot.com",
|
||||||
|
"ar",
|
||||||
|
) {
|
||||||
override val client = super.client.newBuilder()
|
override val client = super.client.newBuilder()
|
||||||
.rateLimit(2)
|
.rateLimit(2)
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
|
override fun getChapterFeedUrl(doc: Document): String {
|
||||||
|
return URLDecoder.decode(super.getChapterFeedUrl(doc), StandardCharsets.UTF_8.toString())
|
||||||
|
.removeArabicChars()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun String.removeArabicChars() =
|
||||||
|
this.replace(ARABIC_CHARS_REGEX, "")
|
||||||
|
.replace(EXTRA_SPACES_REGEX, "")
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
val ARABIC_CHARS_REGEX = "[\\u0600-\\u06FF]".toRegex()
|
||||||
|
val EXTRA_SPACES_REGEX = "\\s{2,}".toRegex()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue