Skip to content

Commit

Permalink
DeviantArt: Fix NullPointerException for some galleries (#6812)
Browse files Browse the repository at this point in the history
Select always-present element for gallery name
  • Loading branch information
DokterKaj authored Dec 27, 2024
1 parent 7055f25 commit 1bbcabf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/all/deviantart/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'DeviantArt'
extClass = '.DeviantArt'
extVersionCode = 1
extVersionCode = 2
isNsfw = true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class DeviantArt : HttpSource() {
val manga = SManga.create().apply {
// If manga is sub-gallery then use sub-gallery name, else use gallery name
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(" ")
description = subFolderGallery?.selectFirst(".legacy-journal")?.wholeText()
thumbnail_url = subFolderGallery?.selectFirst("img[property=contentUrl]")?.absUrl("src")
Expand Down

0 comments on commit 1bbcabf

Please sign in to comment.