rs fix for mobile User Agent (#15847)
This commit is contained in:
parent
0318ea6cdd
commit
8f340df01b
|
@ -6,7 +6,7 @@ ext {
|
|||
extName = 'Reaper Scans'
|
||||
pkgNameSuffix = 'en.reaperscans'
|
||||
extClass = '.ReaperScans'
|
||||
extVersionCode = 42
|
||||
extVersionCode = 43
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
|
|
@ -276,8 +276,9 @@ class ReaperScans : ParsedHttpSource() {
|
|||
|
||||
// Page
|
||||
override fun pageListParse(document: Document): List<Page> {
|
||||
document.select("noscript").remove()
|
||||
return document.select("img.max-w-full").mapIndexed { index, element ->
|
||||
Page(index, imageUrl = element.attr("abs:src"))
|
||||
Page(index, imageUrl = element.imgAttr())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -325,6 +326,13 @@ class ReaperScans : ParsedHttpSource() {
|
|||
}
|
||||
}
|
||||
|
||||
fun Element.imgAttr(): String = when {
|
||||
hasAttr("data-lazy-src") -> attr("abs:data-lazy-src")
|
||||
hasAttr("data-src") -> attr("abs:data-src")
|
||||
hasAttr("data-cfsrc") -> attr("abs:data-cfsrc")
|
||||
else -> attr("abs:src")
|
||||
}
|
||||
|
||||
// Unused
|
||||
override fun searchMangaNextPageSelector() = throw UnsupportedOperationException("Not Used")
|
||||
|
||||
|
|
Loading…
Reference in New Issue