MangaOwl - Update Selectors (#2360)

MangaOwl - Update Selectors
This commit is contained in:
happywillow0 2020-03-04 07:14:04 -05:00 committed by GitHub
parent 7f98272539
commit 418c272a68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: MangaOwl'
pkgNameSuffix = 'en.mangaowl'
extClass = '.MangaOwl'
extVersionCode = 3
extVersionCode = 4
libVersion = '1.2'
}

View File

@ -79,7 +79,8 @@ class MangaOwl : ParsedHttpSource() {
val manga = SManga.create()
manga.title = infoElement.select("h2").first().ownText()
manga.author = infoElement.select("p:contains(author)").first().ownText()
manga.author = infoElement.select("p:contains(author) a").text()
manga.artist = manga.author
val status = infoElement.select("p:contains(pub. status)").first().ownText()
manga.status = parseStatus(status)
manga.genre = infoElement.select("a.label").mapNotNull{ it.text() }.joinToString(", ")
@ -98,16 +99,16 @@ class MangaOwl : ParsedHttpSource() {
// Chapters
override fun chapterListSelector() = "div.table-chapter-list table.table-responsive-md tr"
override fun chapterListSelector() = "div.table-chapter-list ul li"
override fun chapterFromElement(element: Element): SChapter {
val chapter = SChapter.create()
element.select("a").let {
// They replace some URLs with a different host getting a path of domain.com/reader/reader/, fix to make usable on baseUrl
chapter.setUrlWithoutDomain(it.attr("href").replace("/reader/reader/", "/reader/"))
chapter.name = it.text()
chapter.name = it.select("label")[0].text()
}
chapter.date_upload = parseChapterDate(element.select("td + td").text())
chapter.date_upload = parseChapterDate(element.select("small").text())
return chapter
}