MangaLife, MangaSee: revert temporary page fixes, show error about blocking tachi when no host is found (#6145)

This commit is contained in:
scb261 2021-03-11 17:39:28 +02:00 committed by GitHub
parent 30ebfdedd7
commit 3ddd9a52e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 6 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'MangaLife'
pkgNameSuffix = 'en.mangalife'
extClass = '.MangaLife'
extVersionCode = 14
extVersionCode = 15
libVersion = '1.2'
}

View File

@ -41,7 +41,7 @@ class MangaLife : HttpSource() {
override val supportsLatest = true
private val rateLimitInterceptor = RateLimitInterceptor(1, 2)
private val rateLimitInterceptor = RateLimitInterceptor(1)
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
.addNetworkInterceptor(rateLimitInterceptor)
@ -264,7 +264,13 @@ class MangaLife : HttpSource() {
val pageTotal = curChapter["Page"].string.toInt()
val host = "https://" + script.substringAfter("vm.justgiveupalready = \"").substringBefore("\"")
val host = "https://" +
script
.substringAfter("vm.CurPathName = \"", "")
.substringBefore("\"")
.also { if (it.isEmpty())
throw Exception("$name is overloaded and blocking Tachiyomi right now. Wait for unblock.")
}
val titleURI = script.substringAfter("vm.IndexName = \"").substringBefore("\"")
val seasonURI = curChapter["Directory"].string
.let { if (it.isEmpty()) "" else "$it/" }

View File

@ -5,7 +5,7 @@ ext {
extName = 'Mangasee'
pkgNameSuffix = 'en.mangasee'
extClass = '.Mangasee'
extVersionCode = 18
extVersionCode = 19
libVersion = '1.2'
}

View File

@ -44,7 +44,7 @@ class Mangasee : HttpSource() {
override val supportsLatest = true
private val rateLimitInterceptor = RateLimitInterceptor(1, 2)
private val rateLimitInterceptor = RateLimitInterceptor(1)
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
.addNetworkInterceptor(rateLimitInterceptor)
@ -268,7 +268,13 @@ class Mangasee : HttpSource() {
val pageTotal = curChapter["Page"].string.toInt()
val host = "https://" + script.substringAfter("vm.justgiveupalready = \"").substringBefore("\"")
val host = "https://" +
script
.substringAfter("vm.CurPathName = \"", "")
.substringBefore("\"")
.also { if (it.isEmpty())
throw Exception("$name is overloaded and blocking Tachiyomi right now. Wait for unblock.")
}
val titleURI = script.substringAfter("vm.IndexName = \"").substringBefore("\"")
val seasonURI = curChapter["Directory"].string
.let { if (it.isEmpty()) "" else "$it/" }