Baozi Manhua: fix chapter list for TC (#14909)

This commit is contained in:
stevenyomi 2023-01-12 23:16:02 +08:00 committed by GitHub
parent 318f6fe9fb
commit 0371422720
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 10 deletions

View File

@ -1,3 +1,7 @@
## 1.3.18 (2023-01-12)
- 修复繁体站点章节列表错乱的问题
## 1.3.17 (2022-12-29) ## 1.3.17 (2022-12-29)
- 修复部分图片无法加载的问题 - 修复部分图片无法加载的问题

View File

@ -5,7 +5,7 @@ ext {
extName = 'Baozi Manhua' extName = 'Baozi Manhua'
pkgNameSuffix = 'zh.baozimanhua' pkgNameSuffix = 'zh.baozimanhua'
extClass = '.Baozi' extClass = '.Baozi'
extVersionCode = 17 extVersionCode = 18
} }
apply from: "$rootDir/common.gradle" apply from: "$rootDir/common.gradle"

View File

@ -61,7 +61,7 @@ class Baozi : ParsedHttpSource(), ConfigurableSource {
override fun chapterListParse(response: Response): List<SChapter> { override fun chapterListParse(response: Response): List<SChapter> {
val document = response.asJsoup() val document = response.asJsoup()
val fullListTitle = document.selectFirst(".section-title:containsOwn(章节目录)") val fullListTitle = document.selectFirst(".section-title:containsOwn(章节目录), .section-title:containsOwn(章節目錄)")
return if (fullListTitle == null) { // only latest chapters return if (fullListTitle == null) { // only latest chapters
document.select(Evaluator.Class("comics-chapters")) document.select(Evaluator.Class("comics-chapters"))
} else { } else {
@ -123,15 +123,13 @@ class Baozi : ParsedHttpSource(), ConfigurableSource {
override fun mangaDetailsParse(document: Document): SManga { override fun mangaDetailsParse(document: Document): SManga {
return SManga.create().apply { return SManga.create().apply {
title = document.select("h1.comics-detail__title").text().trim() title = document.select("h1.comics-detail__title").text()
thumbnail_url = document.select("div.pure-g div > amp-img").attr("src").trim() thumbnail_url = document.select("div.pure-g div > amp-img").attr("src").trim()
author = document.select("h2.comics-detail__author").text().trim() author = document.select("h2.comics-detail__author").text()
description = document.select("p.comics-detail__desc").text().trim() description = document.select("p.comics-detail__desc").text()
status = when (document.selectFirst("div.tag-list > span.tag").text().trim()) { status = when (document.selectFirst("div.tag-list > span.tag").text()) {
"连载中" -> SManga.ONGOING "连载中", "連載中" -> SManga.ONGOING
"已完结" -> SManga.COMPLETED "已完结", "已完結" -> SManga.COMPLETED
"連載中" -> SManga.ONGOING
"已完結" -> SManga.COMPLETED
else -> SManga.UNKNOWN else -> SManga.UNKNOWN
} }
} }