MGKomik: fix null pointer error (#10215)
This commit is contained in:
parent
d62b06989b
commit
77b89cec80
@ -3,7 +3,7 @@ ext {
|
|||||||
extClass = '.MGKomik'
|
extClass = '.MGKomik'
|
||||||
themePkg = 'madara'
|
themePkg = 'madara'
|
||||||
baseUrl = 'https://id.mgkomik.cc'
|
baseUrl = 'https://id.mgkomik.cc'
|
||||||
overrideVersionCode = 17
|
overrideVersionCode = 18
|
||||||
isNsfw = false
|
isNsfw = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,22 +45,14 @@ class MGKomik : Madara(
|
|||||||
|
|
||||||
// ================================== Popular ======================================
|
// ================================== Popular ======================================
|
||||||
|
|
||||||
// overriding to change title selector and manga url selector
|
|
||||||
override fun popularMangaFromElement(element: Element): SManga {
|
override fun popularMangaFromElement(element: Element): SManga {
|
||||||
val manga = SManga.create()
|
return SManga.create().apply {
|
||||||
|
element.select("div.item-thumb a").let {
|
||||||
with(element) {
|
setUrlWithoutDomain(it.attr("abs:href"))
|
||||||
selectFirst("div.item-thumb a")!!.let {
|
title = it.attr("title")
|
||||||
manga.setUrlWithoutDomain(it.attr("abs:href"))
|
thumbnail_url = it.select("img").attr("abs:src")
|
||||||
manga.title = it.attr("title")
|
|
||||||
}
|
|
||||||
|
|
||||||
selectFirst("img")?.let {
|
|
||||||
manga.thumbnail_url = imageFromElement(it)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return manga
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ================================ Chapters ================================
|
// ================================ Chapters ================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user