HBrowse Improve Chapter detection (#9390)
* Improved chapter detection * Update build.gradle
This commit is contained in:
parent
4bb792b74c
commit
9d79f5f8dc
src/en/hbrowse
@ -5,7 +5,7 @@ ext {
|
|||||||
extName = 'HBrowse'
|
extName = 'HBrowse'
|
||||||
pkgNameSuffix = 'en.hbrowse'
|
pkgNameSuffix = 'en.hbrowse'
|
||||||
extClass = '.HBrowse'
|
extClass = '.HBrowse'
|
||||||
extVersionCode = 5
|
extVersionCode = 6
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,10 +10,11 @@ import eu.kanade.tachiyomi.source.model.SManga
|
|||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
import kotlinx.serialization.decodeFromString
|
import kotlinx.serialization.decodeFromString
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
|
import okhttp3.Response
|
||||||
|
import okhttp3.Request
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.CookieJar
|
import okhttp3.CookieJar
|
||||||
import okhttp3.FormBody
|
import okhttp3.FormBody
|
||||||
import okhttp3.OkHttpClient
|
|
||||||
import okhttp3.Request
|
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import uy.kohesive.injekt.injectLazy
|
import uy.kohesive.injekt.injectLazy
|
||||||
@ -162,12 +163,16 @@ class HBrowse : ParsedHttpSource() {
|
|||||||
|
|
||||||
// Chapters
|
// Chapters
|
||||||
|
|
||||||
override fun chapterListSelector() = "h2:contains(read manga online) + table a:contains(chapter)"
|
override fun chapterListSelector() = "h2:contains(read manga online) + table tr"
|
||||||
|
|
||||||
|
override fun chapterListParse(response: Response): List<SChapter> {
|
||||||
|
return super.chapterListParse(response).reversed()
|
||||||
|
}
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element): SChapter {
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
return SChapter.create().apply {
|
return SChapter.create().apply {
|
||||||
name = element.text().substringAfter("View ")
|
name = element.select("td:first-of-type").text()
|
||||||
setUrlWithoutDomain(element.attr("href"))
|
setUrlWithoutDomain(element.select("a.listLink").attr("href"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user