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