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 Draff
parent 838ee2fc97
commit 9d73eef491
2 changed files with 3 additions and 3 deletions

View File

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

View File

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