SirenKomik: Fix nullpointer (#6092)

Fix nullpointer
This commit is contained in:
Chopper 2024-11-17 10:15:28 -03:00 committed by Draff
parent a3f8524300
commit e062d5d30d
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 5 additions and 4 deletions

View File

@ -3,7 +3,7 @@ ext {
extClass = '.SirenKomik' extClass = '.SirenKomik'
themePkg = 'mangathemesia' themePkg = 'mangathemesia'
baseUrl = 'https://sirenkomik.my.id' baseUrl = 'https://sirenkomik.my.id'
overrideVersionCode = 3 overrideVersionCode = 4
} }
apply from: "$rootDir/common.gradle" apply from: "$rootDir/common.gradle"

View File

@ -25,11 +25,12 @@ class SirenKomik : MangaThemesia(
override val seriesAuthorSelector = ".keterangan-komik:contains(author) span" override val seriesAuthorSelector = ".keterangan-komik:contains(author) span"
override val seriesArtistSelector = ".keterangan-komik:contains(artist) span" override val seriesArtistSelector = ".keterangan-komik:contains(artist) span"
override fun chapterListSelector() = ".list-chapter a"
override fun chapterFromElement(element: Element) = SChapter.create().apply { override fun chapterFromElement(element: Element) = SChapter.create().apply {
val urlElements = element.select("a") name = element.selectFirst(".nomer-chapter")!!.text()
setUrlWithoutDomain(urlElements.attr("href"))
name = element.select(".nomer-chapter").text().ifBlank { urlElements.first()!!.text() }
date_upload = element.selectFirst(".tgl-chapter")?.text().parseChapterDate() date_upload = element.selectFirst(".tgl-chapter")?.text().parseChapterDate()
setUrlWithoutDomain(element.absUrl("href"))
} }
override fun pageListParse(document: Document): List<Page> { override fun pageListParse(document: Document): List<Page> {