Merge pull request #492 from Pavkazzz/com-x

Com x
This commit is contained in:
Carlos 2018-09-15 07:02:01 -04:00 committed by GitHub
commit 4dd1719cfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -5,9 +5,9 @@ ext {
appName = 'Tachiyomi: ComX'
pkgNameSuffix = 'ru.comx'
extClass = '.ComX'
extVersionCode = 1
extVersionSuffix = 1
libVersion = '1.0'
extVersionCode = 2
extVersionSuffix = 2
libVersion = '1.2'
}
apply from: "$rootDir/common.gradle"

View File

@ -37,7 +37,7 @@ class ComX : ParsedHttpSource() {
override fun popularMangaFromElement(element: Element): SManga {
val manga = SManga.create()
manga.thumbnail_url = baseUrl + element.select("img").first().attr("src")
element.select("a").first().let {
element.select("div.info-poster1 a").first().let {
manga.setUrlWithoutDomain(it.attr("href"))
manga.title = it.text()
}
@ -90,9 +90,10 @@ class ComX : ParsedHttpSource() {
val text = infoElement.select("*").text()
if (!text.contains("Добавить описание на комикс")) {
manga.description = text
.removeRange(0, text.indexOf("Отслеживать"))
.removeRange(text.indexOf("Читать комикс"), text.length)
val fromRemove = "Отслеживать"
val toRemove = "Читать комикс"
val desc = text.removeRange(0, text.indexOf(fromRemove)+fromRemove.length)
manga.description = desc.removeRange(desc.indexOf(toRemove)+toRemove.length, desc.length)
}
val src = infoElement.select("img").attr("src")