Fix Photos18 parsing image’s url (#1477)

This commit is contained in:
Cuong M. Tran 2024-02-23 01:39:55 +07:00 committed by GitHub
parent 0f51a15a1d
commit 849728a71c
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'Photos18'
extClass = '.Photos18'
extVersionCode = 2
extVersionCode = 3
isNsfw = true
}

View File

@ -51,7 +51,7 @@ class Photos18 : HttpSource(), ConfigurableSource {
SManga.create().apply {
url = link.attr("href").stripLang()
title = link.ownText()
thumbnail_url = baseUrl + it.selectFirst(Evaluator.Tag("img"))!!.attr("data-src")
thumbnail_url = baseUrl + it.selectFirst(Evaluator.Tag("img"))!!.attr("src")
genre = cardBody.selectFirst(Evaluator.Tag("label"))!!.ownText()
status = SManga.COMPLETED
initialized = true
@ -100,7 +100,7 @@ class Photos18 : HttpSource(), ConfigurableSource {
val document = response.asJsoup()
val images = document.selectFirst(Evaluator.Id("content"))!!.select(Evaluator.Tag("img"))
return images.mapIndexed { index, image ->
Page(index, imageUrl = image.attr("data-src"))
Page(index, imageUrl = image.attr("src"))
}
}