make LikeManga into multisrc and add zinmanga.io (#1048)
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
@ -0,0 +1,10 @@
|
|||
package eu.kanade.tachiyomi.extension.en.likemanga
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.likemanga.LikeManga
|
||||
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||
|
||||
class LikeMangaIO : LikeManga("LikeManga", "https://likemanga.io", "en") {
|
||||
override val client = super.client.newBuilder()
|
||||
.rateLimit(1, 2)
|
||||
.build()
|
||||
}
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
@ -0,0 +1,7 @@
|
|||
package eu.kanade.tachiyomi.extension.en.zinmanhwa
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.likemanga.LikeManga
|
||||
|
||||
class ZinMangaIO : LikeManga("ZinManga.io", "https://zinmanga.io", "en") {
|
||||
override val versionId = 2
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
package eu.kanade.tachiyomi.extension.en.zinmanhwa
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
class Zinmanhwa : Madara(
|
||||
"Zinmanhwa",
|
||||
"https://zinmanga.io",
|
||||
"en",
|
||||
dateFormat = SimpleDateFormat("dd/MM/yy", Locale.US),
|
||||
)
|
|
@ -1,8 +1,7 @@
|
|||
package eu.kanade.tachiyomi.extension.en.likemanga
|
||||
package eu.kanade.tachiyomi.multisrc.likemanga
|
||||
|
||||
import android.util.Base64
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||
import eu.kanade.tachiyomi.source.model.Filter
|
||||
import eu.kanade.tachiyomi.source.model.FilterList
|
||||
import eu.kanade.tachiyomi.source.model.MangasPage
|
||||
|
@ -25,19 +24,15 @@ import uy.kohesive.injekt.injectLazy
|
|||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
class LikeManga : ParsedHttpSource() {
|
||||
|
||||
override val name = "LikeManga"
|
||||
|
||||
override val lang = "en"
|
||||
|
||||
override val baseUrl = "https://likemanga.io"
|
||||
abstract class LikeManga(
|
||||
override val name: String,
|
||||
override val baseUrl: String,
|
||||
override val lang: String,
|
||||
) : ParsedHttpSource() {
|
||||
|
||||
override val supportsLatest = true
|
||||
|
||||
override val client = network.cloudflareClient.newBuilder()
|
||||
.rateLimit(1, 2)
|
||||
.build()
|
||||
override val client = network.cloudflareClient
|
||||
|
||||
override fun headersBuilder() = super.headersBuilder()
|
||||
.add("Referer", "$baseUrl/")
|
||||
|
@ -189,8 +184,7 @@ class LikeManga : ParsedHttpSource() {
|
|||
|
||||
val lastPage = document.select("div.chapters_pagination a:not(.next)").last()
|
||||
?.attr("onclick")
|
||||
?.substringAfter("(")
|
||||
?.substringBefore(")")
|
||||
?.run { chapterPageCountRegex.find(this)?.groupValues?.get(1) }
|
||||
?.toIntOrNull()
|
||||
?: return chapters
|
||||
|
||||
|
@ -289,5 +283,6 @@ class LikeManga : ParsedHttpSource() {
|
|||
val dateFormat by lazy {
|
||||
SimpleDateFormat("MMMM dd, yyyy", Locale.ENGLISH)
|
||||
}
|
||||
private val chapterPageCountRegex = Regex("""load_list_chapter\((\d+)\)""")
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package eu.kanade.tachiyomi.extension.en.likemanga
|
||||
package eu.kanade.tachiyomi.multisrc.likemanga
|
||||
|
||||
import eu.kanade.tachiyomi.source.model.Filter
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package eu.kanade.tachiyomi.multisrc.likemanga
|
||||
|
||||
import generator.ThemeSourceData.SingleLang
|
||||
import generator.ThemeSourceGenerator
|
||||
|
||||
class LikeMangaGenerator : ThemeSourceGenerator {
|
||||
|
||||
override val themePkg = "likemanga"
|
||||
|
||||
override val themeClass = "LikeManga"
|
||||
|
||||
override val baseVersionCode: Int = 1
|
||||
|
||||
override val sources = listOf(
|
||||
SingleLang("LikeManga", "https://likemanga.io", "en", className = "LikeMangaIO", pkgName = "likemanga", overrideVersionCode = 3),
|
||||
SingleLang("ZinManga.io", "https://zinmanga.io", "en", className = "ZinMangaIO", pkgName = "zinmanhwa", overrideVersionCode = 34),
|
||||
)
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun main(args: Array<String>) {
|
||||
LikeMangaGenerator().createAll()
|
||||
}
|
||||
}
|
||||
}
|
|
@ -479,7 +479,6 @@ class MadaraGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Zandy no Fansub", "https://zandynofansub.aishiteru.org", "en"),
|
||||
SingleLang("ZinChanManga", "https://zinchanmanga.net", "en", isNsfw = true, overrideVersionCode = 1),
|
||||
SingleLang("Zinmanga", "https://zinmanga.com", "en", overrideVersionCode = 1),
|
||||
SingleLang("Zinmanhwa", "https://zinmanga.io", "en", overrideVersionCode = 1),
|
||||
SingleLang("ZuttoManga", "https://zuttomanga.com", "en", overrideVersionCode = 1),
|
||||
SingleLang("Çizgi Roman Arşivi", "https://cizgiromanarsivi.com", "tr", className = "CizgiRomanArsivi"),
|
||||
SingleLang("Detective Conan Ar", "https://manga.detectiveconanar.com", "ar", sourceName = "شبكة كونان العربية", overrideVersionCode = 2),
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
ext {
|
||||
extName = 'LikeManga'
|
||||
extClass = '.LikeManga'
|
||||
extVersionCode = 3
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|