Source: ComX. Fix Names and description
This commit is contained in:
parent
c3a92ad52a
commit
8befcb4b93
|
@ -37,7 +37,7 @@ class ComX : ParsedHttpSource() {
|
||||||
override fun popularMangaFromElement(element: Element): SManga {
|
override fun popularMangaFromElement(element: Element): SManga {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
manga.thumbnail_url = baseUrl + element.select("img").first().attr("src")
|
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.setUrlWithoutDomain(it.attr("href"))
|
||||||
manga.title = it.text()
|
manga.title = it.text()
|
||||||
}
|
}
|
||||||
|
@ -90,9 +90,10 @@ class ComX : ParsedHttpSource() {
|
||||||
|
|
||||||
val text = infoElement.select("*").text()
|
val text = infoElement.select("*").text()
|
||||||
if (!text.contains("Добавить описание на комикс")) {
|
if (!text.contains("Добавить описание на комикс")) {
|
||||||
manga.description = text
|
val fromRemove = "Отслеживать"
|
||||||
.removeRange(0, text.indexOf("Отслеживать"))
|
val toRemove = "Читать комикс"
|
||||||
.removeRange(text.indexOf("Читать комикс"), text.length)
|
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")
|
val src = infoElement.select("img").attr("src")
|
||||||
|
|
Loading…
Reference in New Issue