WNACG: disable SSL for images (#14010)

This commit is contained in:
stevenyomi 2022-10-28 21:52:45 +08:00 committed by GitHub
parent 151a4ade62
commit f11ff6a1c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'WNACG'
pkgNameSuffix = 'zh.wnacg'
extClass = '.wnacg'
extVersionCode = 7
extVersionCode = 8
isNsfw = true
}

View File

@ -63,6 +63,7 @@ class wnacg : ParsedHttpSource() {
manga.url = link.attr("href")
manga.title = link.text()
manga.thumbnail_url = element.selectFirst("img").absUrl("src")
.replaceBefore(':', "http")
// maybe the local cache cause the old source (url) can not be update. but the image can be update on detailpage.
// ps. new machine can be load img normal.
@ -83,7 +84,7 @@ class wnacg : ParsedHttpSource() {
manga.artist = document.selectFirst("div.uwuinfo p")?.text() ?: "Unknown"
manga.author = document.selectFirst("div.uwuinfo p")?.text() ?: "Unknown"
manga.thumbnail_url =
"https://" + document.selectFirst("div.uwthumb img").attr("src").replace("//", "")
"http:" + document.selectFirst("div.uwthumb img").attr("src")
manga.description =
document.selectFirst("div.asTBcell p")?.html()?.replace("<br>", "\n")
@ -103,7 +104,7 @@ class wnacg : ParsedHttpSource() {
val galleryaid =
response.body!!.string()
return regex.findAll(galleryaid).mapIndexedTo(ArrayList()) { index, match ->
Page(index, imageUrl = "https:" + match.value)
Page(index, imageUrl = "http:" + match.value)
}
}