[RU]Chan pack title cut (#11223)

* [RU]Chan pack title cut

* error
This commit is contained in:
e-shl 2022-03-23 13:40:45 +05:00 committed by GitHub
parent 5182bb7a66
commit 986ed0e88b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 10 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Henchan' extName = 'Henchan'
pkgNameSuffix = 'ru.henchan' pkgNameSuffix = 'ru.henchan'
extClass = '.Henchan' extClass = '.Henchan'
extVersionCode = 29 extVersionCode = 30
isNsfw = true isNsfw = true
} }

View File

@ -106,7 +106,7 @@ class Henchan : ParsedHttpSource() {
val urlElem = element.select("h2 > a").first() val urlElem = element.select("h2 > a").first()
manga.setUrlWithoutDomain(urlElem.attr("href")) manga.setUrlWithoutDomain(urlElem.attr("href"))
manga.title = urlElem.text() manga.title = urlElem.attr("title")
return manga return manga
} }
@ -125,9 +125,10 @@ class Henchan : ParsedHttpSource() {
override fun mangaDetailsParse(document: Document): SManga { override fun mangaDetailsParse(document: Document): SManga {
val manga = SManga.create() val manga = SManga.create()
manga.title = document.select("title").text().substringBefore(" »")
manga.author = document.select(".row .item2 h2")[1].text() manga.author = document.select(".row .item2 h2")[1].text()
manga.genre = document.select(".sidetag > a:eq(2)").joinToString { it.text() } manga.genre = document.select(".sidetag > a:eq(2)").joinToString { it.text() }
manga.description = document.select("#description").text() manga.description = document.select("#description").text().trim()
manga.thumbnail_url = document.select("img#cover").attr("abs:src").getHQThumbnail() manga.thumbnail_url = document.select("img#cover").attr("abs:src").getHQThumbnail()
return manga return manga
} }

View File

@ -5,7 +5,7 @@ ext {
extName = 'Mangachan' extName = 'Mangachan'
pkgNameSuffix = 'ru.mangachan' pkgNameSuffix = 'ru.mangachan'
extClass = '.Mangachan' extClass = '.Mangachan'
extVersionCode = 10 extVersionCode = 11
} }
dependencies { dependencies {

View File

@ -122,7 +122,7 @@ class Mangachan : ParsedHttpSource() {
manga.thumbnail_url = element.select("div.manga_images img").first().attr("src") manga.thumbnail_url = element.select("div.manga_images img").first().attr("src")
element.select("h2 > a").first().let { element.select("h2 > a").first().let {
manga.setUrlWithoutDomain(it.attr("href")) manga.setUrlWithoutDomain(it.attr("href"))
manga.title = it.text() manga.title = it.attr("title")
} }
return manga return manga
} }
@ -131,7 +131,7 @@ class Mangachan : ParsedHttpSource() {
val manga = SManga.create() val manga = SManga.create()
element.select("a:nth-child(1)").first().let { element.select("a:nth-child(1)").first().let {
manga.setUrlWithoutDomain(it.attr("href")) manga.setUrlWithoutDomain(it.attr("href"))
manga.title = it.text() manga.title = it.attr("title")
} }
return manga return manga
} }
@ -184,10 +184,11 @@ class Mangachan : ParsedHttpSource() {
"манга" "манга"
} }
val manga = SManga.create() val manga = SManga.create()
manga.title = document.select("title").text().substringBefore(" »")
manga.author = infoElement.select("tr:eq(2) > td:eq(1)").text() manga.author = infoElement.select("tr:eq(2) > td:eq(1)").text()
manga.genre = infoElement.select("tr:eq(5) > td:eq(1)").text().split(",").plusElement(category).joinToString { it.trim() } manga.genre = infoElement.select("tr:eq(5) > td:eq(1)").text().split(",").plusElement(category).joinToString { it.trim() }
manga.status = parseStatus(infoElement.select("tr:eq(4) > td:eq(1)").text()) manga.status = parseStatus(infoElement.select("tr:eq(4) > td:eq(1)").text())
manga.description = descElement.textNodes().first().text() manga.description = descElement.textNodes().first().text().trim()
manga.thumbnail_url = imgElement.attr("src") manga.thumbnail_url = imgElement.attr("src")
return manga return manga
} }

View File

@ -5,7 +5,7 @@ ext {
extName = 'Yaoichan' extName = 'Yaoichan'
pkgNameSuffix = 'ru.yaoichan' pkgNameSuffix = 'ru.yaoichan'
extClass = '.Yaoichan' extClass = '.Yaoichan'
extVersionCode = 1 extVersionCode = 2
isNsfw = true isNsfw = true
} }

View File

@ -114,7 +114,7 @@ class Yaoichan : ParsedHttpSource() {
manga.thumbnail_url = element.select("div.manga_images img").first().attr("src") manga.thumbnail_url = element.select("div.manga_images img").first().attr("src")
element.select("h2 > a").first().let { element.select("h2 > a").first().let {
manga.setUrlWithoutDomain(it.attr("href")) manga.setUrlWithoutDomain(it.attr("href"))
manga.title = it.text() manga.title = it.attr("title")
} }
return manga return manga
} }
@ -140,10 +140,11 @@ class Yaoichan : ParsedHttpSource() {
"манга" "манга"
} }
val manga = SManga.create() val manga = SManga.create()
manga.title = document.select("title").text().substringBefore(" »")
manga.author = infoElement.select("tr:eq(2) > td:eq(1)").text() manga.author = infoElement.select("tr:eq(2) > td:eq(1)").text()
manga.genre = infoElement.select("tr:eq(5) > td:eq(1)").text().split(",").plusElement(category).joinToString { it.trim() } manga.genre = infoElement.select("tr:eq(5) > td:eq(1)").text().split(",").plusElement(category).joinToString { it.trim() }
manga.status = parseStatus(infoElement.select("tr:eq(4) > td:eq(1)").text()) manga.status = parseStatus(infoElement.select("tr:eq(4) > td:eq(1)").text())
manga.description = descElement.textNodes().first().text() manga.description = descElement.textNodes().first().text().trim()
manga.thumbnail_url = imgElement.attr("src") manga.thumbnail_url = imgElement.attr("src")
return manga return manga
} }