More scanlator stuff for batoto (#4398)

* scanlator stuff

* Update build.gradle

* Update BatoTo.kt

* fix

this was the only way I found to make the "unknown" work tbh.
prayge
This commit is contained in:
kana-shii 2024-08-05 11:00:20 -03:00 committed by Draff
parent cca5e276d2
commit cea1f3c81c
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'Bato.to'
extClass = '.BatoToFactory'
extVersionCode = 36
extVersionCode = 37
isNsfw = true
}

View File

@ -384,11 +384,14 @@ open class BatoTo(
val chapter = SChapter.create()
val urlElement = element.select("a.chapt")
val group = element.select("div.extra > a:not(.ps-3)").text()
val user = element.select("div.extra > a.ps-3").text()
val time = element.select("div.extra > i.ps-3").text()
chapter.setUrlWithoutDomain(urlElement.attr("href"))
chapter.name = urlElement.text()
if (group != "") {
chapter.scanlator = group
chapter.scanlator = when {
group.isNotBlank() -> group
user.isNotBlank() -> user
else -> "Unknown"
}
if (time != "") {
chapter.date_upload = parseChapterDate(time)