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

Corrected image extraction in CrunchyrollConverter #143

Merged
merged 1 commit into from
Oct 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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