Fix StarboundScans revert to old loading by using src attribute (#10575)
* fix(starboundscans): revert to old src because of site * Fix Review
This commit is contained in:
parent
84da2bf59f
commit
f1f374f773
@ -3,7 +3,7 @@ ext {
|
||||
extClass = '.StarboundScans'
|
||||
themePkg = 'madara'
|
||||
baseUrl = 'https://starboundscans.com'
|
||||
overrideVersionCode = 1
|
||||
overrideVersionCode = 2
|
||||
isNsfw = false
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ import keiyoushi.utils.tryParse
|
||||
import okhttp3.Headers
|
||||
import okhttp3.Response
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
@ -63,9 +64,16 @@ class StarboundScans : Madara(
|
||||
}
|
||||
}
|
||||
|
||||
private fun Element.imgAttr(): String {
|
||||
return when {
|
||||
hasAttr("data-src") -> attr("abs:data-src")
|
||||
else -> attr("abs:src")
|
||||
}
|
||||
}
|
||||
|
||||
override fun pageListParse(document: Document): List<Page> {
|
||||
return document.select("img.wp-manga-chapter-img").mapIndexed { index, element ->
|
||||
val imageUrl = element.attr("abs:data-src")
|
||||
val imageUrl = element.imgAttr()
|
||||
Page(index, url = document.location(), imageUrl = imageUrl)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user