mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-22 02:12:42 +01:00
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:
parent
74717fddcc
commit
0382c1350c
@ -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) {
|
||||||
|
@ -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 |
@ -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))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user