DeviantArt: Fix NullPointerException for some galleries (#6812)
Select always-present element for gallery name
This commit is contained in:
parent
c3c87863b2
commit
065ff132a0
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = 'DeviantArt'
|
extName = 'DeviantArt'
|
||||||
extClass = '.DeviantArt'
|
extClass = '.DeviantArt'
|
||||||
extVersionCode = 1
|
extVersionCode = 2
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ class DeviantArt : HttpSource() {
|
||||||
val manga = SManga.create().apply {
|
val manga = SManga.create().apply {
|
||||||
// If manga is sub-gallery then use sub-gallery name, else use gallery name
|
// If manga is sub-gallery then use sub-gallery name, else use gallery name
|
||||||
title = subFolderGallery?.selectFirst("._2vMZg + ._2vMZg")?.text()?.substringBeforeLast(" ")
|
title = subFolderGallery?.selectFirst("._2vMZg + ._2vMZg")?.text()?.substringBeforeLast(" ")
|
||||||
?: document.selectFirst(".ds-card-selected h2")!!.text()
|
?: subFolderGallery?.selectFirst("[aria-haspopup=listbox] > div")!!.ownText()
|
||||||
author = document.title().substringBefore(" ")
|
author = document.title().substringBefore(" ")
|
||||||
description = subFolderGallery?.selectFirst(".legacy-journal")?.wholeText()
|
description = subFolderGallery?.selectFirst(".legacy-journal")?.wholeText()
|
||||||
thumbnail_url = subFolderGallery?.selectFirst("img[property=contentUrl]")?.absUrl("src")
|
thumbnail_url = subFolderGallery?.selectFirst("img[property=contentUrl]")?.absUrl("src")
|
||||||
|
|
Loading…
Reference in New Issue