Fix chapter images not loading in MY. (#9328)
This commit is contained in:
parent
7a756db780
commit
f1c948d5b9
@ -5,7 +5,7 @@ ext {
|
||||
extName = 'MangaYabu!'
|
||||
pkgNameSuffix = 'pt.mangayabu'
|
||||
extClass = '.MangaYabu'
|
||||
extVersionCode = 12
|
||||
extVersionCode = 13
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -17,7 +17,6 @@ import org.jsoup.Jsoup
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import rx.Observable
|
||||
import java.text.ParseException
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
import java.util.concurrent.TimeUnit
|
||||
@ -39,7 +38,7 @@ class MangaYabu : ParsedHttpSource() {
|
||||
.connectTimeout(2, TimeUnit.MINUTES)
|
||||
.readTimeout(2, TimeUnit.MINUTES)
|
||||
.writeTimeout(2, TimeUnit.MINUTES)
|
||||
.addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS))
|
||||
.addInterceptor(RateLimitInterceptor(1, 3, TimeUnit.SECONDS))
|
||||
.build()
|
||||
|
||||
override fun headersBuilder(): Headers.Builder = Headers.Builder()
|
||||
@ -120,7 +119,7 @@ class MangaYabu : ParsedHttpSource() {
|
||||
}
|
||||
|
||||
override fun pageListParse(document: Document): List<Page> {
|
||||
return document.select("div.image-navigator img.slideit")
|
||||
return document.select("img.slideit")
|
||||
.mapIndexed { i, element ->
|
||||
Page(i, document.location(), element.imgAttr())
|
||||
}
|
||||
@ -165,11 +164,8 @@ class MangaYabu : ParsedHttpSource() {
|
||||
}
|
||||
|
||||
private fun String.toDate(): Long {
|
||||
return try {
|
||||
DATE_FORMATTER.parse(this)?.time ?: 0L
|
||||
} catch (e: ParseException) {
|
||||
0L
|
||||
}
|
||||
return runCatching { DATE_FORMATTER.parse(this)?.time }
|
||||
.getOrNull() ?: 0L
|
||||
}
|
||||
|
||||
private fun String.toStatus() = when (this) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user