Added Volume and Title to chapters from MangaHere (#523)
This commit is contained in:
parent
0db1a3167d
commit
dc592e92b5
1 changed files with 14 additions and 2 deletions
|
@ -80,10 +80,22 @@ class Mangahere(override val id: Int) : ParsedOnlineSource() {
|
||||||
override fun chapterListSelector() = ".detail_list > ul:not([class]) > li"
|
override fun chapterListSelector() = ".detail_list > ul:not([class]) > li"
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element, chapter: Chapter) {
|
override fun chapterFromElement(element: Element, chapter: Chapter) {
|
||||||
val urlElement = element.select("a").first()
|
val parentEl = element.select("span.left").first()
|
||||||
|
|
||||||
|
val urlElement = parentEl.select("a").first()
|
||||||
|
|
||||||
|
var volume = parentEl.select("span.mr6")?.first()?.text()?.trim()?:""
|
||||||
|
if (volume.length > 0) {
|
||||||
|
volume = " - " + volume
|
||||||
|
}
|
||||||
|
|
||||||
|
var title = parentEl?.textNodes()?.last()?.text()?.trim()?:""
|
||||||
|
if (title.length > 0) {
|
||||||
|
title = " - " + title
|
||||||
|
}
|
||||||
|
|
||||||
chapter.setUrlWithoutDomain(urlElement.attr("href"))
|
chapter.setUrlWithoutDomain(urlElement.attr("href"))
|
||||||
chapter.name = urlElement.text()
|
chapter.name = urlElement.text() + volume + title
|
||||||
chapter.date_upload = element.select("span.right").first()?.text()?.let { parseChapterDate(it) } ?: 0
|
chapter.date_upload = element.select("span.right").first()?.text()?.let { parseChapterDate(it) } ?: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue