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

Commit

Permalink
Merge pull request #143 from Z-Jais/master
Browse files Browse the repository at this point in the history
Corrected image extraction in CrunchyrollConverter
  • Loading branch information
Ziedelth authored Oct 1, 2023
2 parents fac88a1 + cf20c51 commit 6f92381
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 6f92381

Please sign in to comment.