Remove Miaoshang (#5271)

* Remove Miaoshang

* Revert changes in ba0f132422 (#2556)

---------

Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>
This commit is contained in:
Chopper 2024-09-28 09:51:49 -03:00 committed by GitHub
parent 74717fddcc
commit 0382c1350c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 2 additions and 56 deletions

View File

@ -16,11 +16,11 @@ open class MCCMSConfig(
hasCategoryPage: Boolean = true, hasCategoryPage: Boolean = true,
val textSearchOnlyPageOne: Boolean = false, val textSearchOnlyPageOne: Boolean = false,
val useMobilePageList: Boolean = false, val useMobilePageList: Boolean = false,
protected val lazyLoadImageAttr: String = "data-original", private val lazyLoadImageAttr: String = "data-original",
) { ) {
val genreData = GenreData(hasCategoryPage) val genreData = GenreData(hasCategoryPage)
open fun pageListParse(response: Response): List<Page> { fun pageListParse(response: Response): List<Page> {
val document = response.asJsoup() val document = response.asJsoup()
return if (useMobilePageList) { return if (useMobilePageList) {

View File

@ -1,9 +0,0 @@
ext {
extName = 'Miaoshang Manhua'
extClass = '.Miaoshang'
themePkg = 'mccms'
baseUrl = 'https://www.miaoshangmanhua.com'
overrideVersionCode = 1
}
apply from: "$rootDir/common.gradle"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

View File

@ -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<Page> {
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))
}
}
}
}
}