SinMH: filter out empty genre and remove YKMH (site is down) (#12870)

This commit is contained in:
stevenyomi 2022-08-07 05:31:14 +08:00 committed by GitHub
parent 66fed2e8b2
commit c074104d7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 5 additions and 21 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

View File

@ -1,14 +0,0 @@
package eu.kanade.tachiyomi.extension.zh.manhuadui
import eu.kanade.tachiyomi.multisrc.sinmh.SinMH
import eu.kanade.tachiyomi.source.model.SChapter
import org.jsoup.nodes.Document
class YKMH : SinMH("优酷漫画", "http://www.ykmh.com") {
override val id = 1637952806167036168
override val mobileUrl = "http://wap.ykmh.com"
override fun mangaDetailsParse(document: Document) = mangaDetailsParseDMZJStyle(document, hasBreadcrumb = false)
override fun List<SChapter>.sortedDescending() = this
}

View File

@ -120,8 +120,10 @@ abstract class SinMH(
protected open fun mangaDetailsParseDefaultGenre(document: Document, detailsList: Element): String {
val category = detailsList.selectFirst("strong:contains(类型) + a")
val breadcrumbs = document.selectFirst("div.breadcrumb-bar").select("a[href^=/list/]")
breadcrumbs.add(0, category)
return breadcrumbs.joinToString(", ") { it.text() }
return buildString {
append(category)
breadcrumbs.map(Element::text).filter(String::isNotEmpty).joinTo(this, prefix = ", ")
}
}
protected fun mangaDetailsParseDMZJStyle(document: Document, hasBreadcrumb: Boolean) = SManga.create().apply {

View File

@ -6,7 +6,7 @@ import generator.ThemeSourceGenerator
class SinMHGenerator : ThemeSourceGenerator {
override val themeClass = "SinMH"
override val themePkg = "sinmh"
override val baseVersionCode = 6
override val baseVersionCode = 7
override val sources = listOf(
SingleLang(
name = "Gufeng Manhua", baseUrl = "https://www.gufengmh9.com", lang = "zh",
@ -16,10 +16,6 @@ class SinMHGenerator : ThemeSourceGenerator {
name = "Imitui Manhua", baseUrl = "https://www.imitui.com", lang = "zh",
className = "Imitui", sourceName = "爱米推漫画", overrideVersionCode = 2
),
SingleLang(
name = "YKMH", baseUrl = "http://www.ykmh.com", lang = "zh", className = "YKMH",
pkgName = "manhuadui", sourceName = "优酷漫画", overrideVersionCode = 17
),
SingleLang(
name = "Qinqin Manhua", baseUrl = "https://www.acgqd.com", lang = "zh",
className = "Qinqin", sourceName = "亲亲漫画", overrideVersionCode = 1