Fix issue parsing chapter list (#8417)
This commit is contained in:
parent
792734c22f
commit
714c773714
@ -5,7 +5,7 @@ ext {
|
|||||||
extName = 'MangaOwl'
|
extName = 'MangaOwl'
|
||||||
pkgNameSuffix = 'en.mangaowl'
|
pkgNameSuffix = 'en.mangaowl'
|
||||||
extClass = '.MangaOwl'
|
extClass = '.MangaOwl'
|
||||||
extVersionCode = 18
|
extVersionCode = 19
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ import eu.kanade.tachiyomi.source.model.SChapter
|
|||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
|
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
|
||||||
import okhttp3.Headers
|
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
@ -122,14 +121,15 @@ class MangaOwl : ParsedHttpSource() {
|
|||||||
|
|
||||||
// Chapters
|
// Chapters
|
||||||
|
|
||||||
override fun chapterListSelector() = "div.table-chapter-list ul li"
|
// Only selects chapter elements with links, since sometimes chapter lists have unlinked chapters
|
||||||
|
override fun chapterListSelector() = "div.table-chapter-list ul li:has(a)"
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element): SChapter {
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
val chapter = SChapter.create()
|
val chapter = SChapter.create()
|
||||||
element.select("a").let {
|
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
|
// 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.setUrlWithoutDomain(it.attr("href").replace("/reader/reader/", "/reader/"))
|
||||||
chapter.name = it.select("label")[0].text()
|
chapter.name = it.select("label").first().text()
|
||||||
}
|
}
|
||||||
chapter.date_upload = parseChapterDate(element.select("small:last-of-type").text())
|
chapter.date_upload = parseChapterDate(element.select("small:last-of-type").text())
|
||||||
|
|
||||||
@ -160,7 +160,6 @@ class MangaOwl : ParsedHttpSource() {
|
|||||||
|
|
||||||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
|
|
||||||
// Filters
|
// Filters
|
||||||
|
|
||||||
override fun getFilterList() = FilterList(
|
override fun getFilterList() = FilterList(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user