diff --git a/lib-multisrc/mccms/src/eu/kanade/tachiyomi/multisrc/mccms/MCCMSConfig.kt b/lib-multisrc/mccms/src/eu/kanade/tachiyomi/multisrc/mccms/MCCMSConfig.kt index a8941bad3..e0036b985 100644 --- a/lib-multisrc/mccms/src/eu/kanade/tachiyomi/multisrc/mccms/MCCMSConfig.kt +++ b/lib-multisrc/mccms/src/eu/kanade/tachiyomi/multisrc/mccms/MCCMSConfig.kt @@ -16,11 +16,11 @@ open class MCCMSConfig( hasCategoryPage: Boolean = true, val textSearchOnlyPageOne: Boolean = false, val useMobilePageList: Boolean = false, - protected val lazyLoadImageAttr: String = "data-original", + private val lazyLoadImageAttr: String = "data-original", ) { val genreData = GenreData(hasCategoryPage) - open fun pageListParse(response: Response): List { + fun pageListParse(response: Response): List { val document = response.asJsoup() return if (useMobilePageList) { diff --git a/src/zh/miaoshang/build.gradle b/src/zh/miaoshang/build.gradle deleted file mode 100644 index 414f87746..000000000 --- a/src/zh/miaoshang/build.gradle +++ /dev/null @@ -1,9 +0,0 @@ -ext { - extName = 'Miaoshang Manhua' - extClass = '.Miaoshang' - themePkg = 'mccms' - baseUrl = 'https://www.miaoshangmanhua.com' - overrideVersionCode = 1 -} - -apply from: "$rootDir/common.gradle" diff --git a/src/zh/miaoshang/res/mipmap-hdpi/ic_launcher.png b/src/zh/miaoshang/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index d2e30c2f1..000000000 Binary files a/src/zh/miaoshang/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/src/zh/miaoshang/res/mipmap-mdpi/ic_launcher.png b/src/zh/miaoshang/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 2efbb790e..000000000 Binary files a/src/zh/miaoshang/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/src/zh/miaoshang/res/mipmap-xhdpi/ic_launcher.png b/src/zh/miaoshang/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 882f424a1..000000000 Binary files a/src/zh/miaoshang/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/src/zh/miaoshang/res/mipmap-xxhdpi/ic_launcher.png b/src/zh/miaoshang/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index b459a45a5..000000000 Binary files a/src/zh/miaoshang/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/zh/miaoshang/res/mipmap-xxxhdpi/ic_launcher.png b/src/zh/miaoshang/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index dbe4b84e0..000000000 Binary files a/src/zh/miaoshang/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/zh/miaoshang/src/eu/kanade/tachiyomi/extension/zh/miaoshang/Miaoshang.kt b/src/zh/miaoshang/src/eu/kanade/tachiyomi/extension/zh/miaoshang/Miaoshang.kt deleted file mode 100644 index b9d32d6bb..000000000 --- a/src/zh/miaoshang/src/eu/kanade/tachiyomi/extension/zh/miaoshang/Miaoshang.kt +++ /dev/null @@ -1,45 +0,0 @@ -package eu.kanade.tachiyomi.extension.zh.miaoshang - -import eu.kanade.tachiyomi.multisrc.mccms.MCCMS -import eu.kanade.tachiyomi.multisrc.mccms.MCCMSConfig -import eu.kanade.tachiyomi.network.interceptor.rateLimitHost -import eu.kanade.tachiyomi.source.model.Page -import eu.kanade.tachiyomi.util.asJsoup -import okhttp3.HttpUrl.Companion.toHttpUrl -import okhttp3.Response -import org.jsoup.Jsoup - -class Miaoshang : MCCMS( - "喵上漫画", - "https://www.miaoshangmanhua.com", - "zh", - MiaoshangMCCMSConfig(), -) { - override val client = network.cloudflareClient.newBuilder() - .rateLimitHost(baseUrl.toHttpUrl(), 2) - .build() - - private class MiaoshangMCCMSConfig : MCCMSConfig( - textSearchOnlyPageOne = true, - lazyLoadImageAttr = "data-src", - ) { - override fun pageListParse(response: Response): List { - val document = response.asJsoup() - val container = document.select(".rd-article-wr") - val comments = container.comments() - - return comments.filter { comment -> - comment.data.contains(lazyLoadImageAttr) - }.mapIndexed { i, comment -> - Jsoup.parse(comment.data) - .selectFirst("img[$lazyLoadImageAttr]")?.attr(lazyLoadImageAttr).let { imageUrl -> - Page(i, imageUrl = imageUrl) - } - }.ifEmpty { - document.select("img[$lazyLoadImageAttr]").mapIndexed { i, img -> - Page(i, imageUrl = img.attr(lazyLoadImageAttr)) - } - } - } - } -}