[myreadingmanga] Add Cloudflare code (#819)

[myreadingmanga] Add Cloudflare code
This commit is contained in:
Logan B 2019-02-13 03:18:04 +13:00 committed by Carlos
parent d181f87667
commit c1b987fa6e
2 changed files with 10 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: MyReadingManga'
pkgNameSuffix = 'all.myreadingmanga'
extClass = '.MyReadingMangaFactory'
extVersionCode = 18
extVersionCode = 19
libVersion = '1.2'
}

View File

@ -5,11 +5,11 @@ import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.Request
import okhttp3.Response
import okhttp3.*
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.concurrent.TimeUnit
open class MyReadingManga(override val lang: String) : ParsedHttpSource() {
@ -17,6 +17,13 @@ open class MyReadingManga(override val lang: String) : ParsedHttpSource() {
override val baseUrl = "https://myreadingmanga.info"
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
.connectTimeout(1, TimeUnit.MINUTES)
.readTimeout(1, TimeUnit.MINUTES)
.retryOnConnectionFailure(true)
.followRedirects(true)
.build()!!
override val supportsLatest = false
override fun popularMangaSelector() = "article"