alt eng title & hide empty(not has translated) chapter (#11804)

This commit is contained in:
Ejan 2022-05-11 23:52:18 +05:00 committed by GitHub
parent 6f2beccf61
commit 4e9f670523
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'UniComics'
pkgNameSuffix = 'ru.unicomics'
extClass = '.UniComics'
extVersionCode = 3
extVersionCode = 4
}
dependencies {

View File

@ -202,7 +202,7 @@ class UniComics : ParsedHttpSource() {
infoElement.select("img").first().attr("src")
else
document.select(".left_comics img").first().attr("src").replace(".jpg", "_big.jpg")
description = infoElement.select("p").last()?.text()
description = infoElement.select("H2").first().text() + "\n" + infoElement.select("p").last()?.text().orEmpty()
author = infoElement.select("tr:contains(Издательство)").text()
genre = infoElement.select("tr:contains(Жанр) a").joinToString { it.text() }
}
@ -228,7 +228,7 @@ class UniComics : ParsedHttpSource() {
return GET("$baseDefaultUrl${manga.url}/page/$page", headers)
}
override fun chapterListSelector() = "div.right_comics"
override fun chapterListSelector() = "div.right_comics:has(td:contains(Читать))"
private fun chapterListParse(response: Response, manga: SManga): List<SChapter> {
val document = response.asJsoup()
@ -236,7 +236,7 @@ class UniComics : ParsedHttpSource() {
}
private fun chapterFromElement(element: Element, manga: SManga): SChapter {
val urlElement = element.select("td:eq(1) a")
val urlElement = element.select("td:contains(Читать) a").first()
val chapter = SChapter.create()
element.select(".list_title").first().text().let {
val titleNoPrefix = it.removePrefix(manga.title).removePrefix(":").trim()