OppaiStream: Fix no chapters found and manga details (#4842)

fix
This commit is contained in:
bapeey 2024-08-30 06:16:05 -05:00 committed by Draff
parent 925e50d120
commit 57bbef431b
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 9 additions and 2 deletions

View File

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

View File

@ -16,6 +16,7 @@ import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import rx.Observable
import java.net.URLDecoder
import java.util.Calendar
class OppaiStream : ParsedHttpSource() {
@ -115,7 +116,13 @@ class OppaiStream : ParsedHttpSource() {
return SManga.create().apply {
thumbnail_url = element.select("img.read-cover").attr("src")
title = element.select("h3.man-title").text()
setUrlWithoutDomain(element.absUrl("href"))
val rawUrl = element.absUrl("href")
val url = if (rawUrl.contains("/fw?to=")) {
URLDecoder.decode(rawUrl.substringAfter("/fw?to="), "UTF-8")
} else {
rawUrl
}
setUrlWithoutDomain(url)
}
}