Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
Corrected image extraction in CrunchyrollConverter
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziedelth committed Oct 1, 2023
1 parent a1cd615 commit cf20c51
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,13 @@ class CrunchyrollConverter(private val platform: CrunchyrollPlatform) {

// ----- IMAGE -----
Logger.info("Get image...")
val image =
result.selectXpath("//*[@id=\"content\"]/div/div[2]/div/div[1]/div[2]/div/div/div[2]/div[2]/figure/picture/img")
.attr("src").toHTTPS()
var image =
result.selectXpath("//*[@id=\"content\"]/div/div[2]/div/div[1]/div[2]/div/div/div[2]/div[2]/figure/picture/img").attr("src").toHTTPS()

if (image.isBlank()) {
image = result.selectXpath("#content > div > div.app-body-wrapper > div > div.erc-series-key-art > div.content-wrapper--MF5LS > div > div > div.background-image > div.content-image--3na7E.undefined.background.tall-image > figure > picture > img").attr("src").toHTTPS()
}

Logger.config("Image: $image")

// ----- DESCRIPTION -----
Expand Down

0 comments on commit cf20c51

Please sign in to comment.