Update extensions to fix issues (#891)

Update extensions to fix issues
This commit is contained in:
DitFranXX 2019-03-12 22:46:48 +09:00 committed by Carlos
parent a648c7f2c9
commit 566c4c1832
8 changed files with 24 additions and 20 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: Japscan'
pkgNameSuffix = 'fr.japscan'
extClass = '.Japscan'
extVersionCode = 7
extVersionCode = 8
libVersion = '1.2'
}

View File

@ -39,9 +39,13 @@ class Japscan : ParsedHttpSource() {
override val supportsLatest = true
override val client: OkHttpClient = network.cloudflareClient.newBuilder().addInterceptor { chain ->
val indicator = "&decodeImage"
val request = chain.request()
val response = chain.proceed(request)
if (!request.url().pathSegments().contains("clel")) return@addInterceptor response
val url = request.url().toString()
val response = chain.proceed(GET(url.substringBefore(indicator)))
if (!url.endsWith(indicator)) return@addInterceptor response
val res = response.body()!!.byteStream().use {
decodeImage(it)
@ -60,13 +64,13 @@ class Japscan : ParsedHttpSource() {
override fun popularMangaSelector() = "#top_mangas_week li > span"
override fun popularMangaRequest(page: Int): Request {
return GET("$baseUrl", headers)
return GET(baseUrl, headers)
}
override fun latestUpdatesSelector() = "#chapters > div:eq(0) > h3.text-truncate"
override fun latestUpdatesRequest(page: Int): Request {
return GET("$baseUrl", headers)
return GET(baseUrl, headers)
}
override fun popularMangaFromElement(element: Element): SManga {
@ -172,9 +176,10 @@ class Japscan : ParsedHttpSource() {
override fun pageListParse(document: Document): List<Page> {
val pages = mutableListOf<Page>()
val imagePath = "(.*\\/).*".toRegex().find(document.select("#image").attr("data-src"))
val imageScrambled = if (!document.select("script[src^='/js/iYFbYi_']").isNullOrEmpty()) "&decodeImage" else ""
document.select("select#pages").first()?.select("option")?.forEach {
pages.add(Page(pages.size, "", "${imagePath?.groupValues?.get(1)}${it.attr("data-img")}"))
pages.add(Page(pages.size, "", "${imagePath?.groupValues?.get(1)}${it.attr("data-img")}$imageScrambled"))
}
return pages
@ -197,7 +202,7 @@ class Japscan : ParsedHttpSource() {
for (x in 0..input.width step 200) {
val col1 = Rect(x, 0, x + 100, input.height)
if ((x + 200) <= input.width) {
if ((x + 200) < input.width) {
val col2 = Rect(x + 100, 0, x + 200, input.height)
xCanvas.drawBitmap(input, col1, col2, null)
xCanvas.drawBitmap(input, col2, col1, null)
@ -211,7 +216,7 @@ class Japscan : ParsedHttpSource() {
for (y in 0..input.height step 200) {
val row1 = Rect(0, y, input.width, y + 100)
if ((y + 200) <= input.height) {
if ((y + 200) < input.height) {
val row2 = Rect(0, y + 100, input.width, y + 200)
canvas.drawBitmap(xResult, row1, row2, null)
canvas.drawBitmap(xResult, row2, row1, null)

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: JMana'
pkgNameSuffix = 'ko.jmana'
extClass = '.JMana'
extVersionCode = 4
extVersionCode = 5
libVersion = '1.2'
}

View File

@ -16,7 +16,7 @@ import java.text.SimpleDateFormat
**/
class JMana : ParsedHttpSource() {
override val name = "JMana"
override val baseUrl = "https://mangahide.com"
override val baseUrl = "https://jmana5.com"
override val lang: String = "ko"
// Latest updates currently returns duplicate manga as it separates manga into chapters

View File

@ -5,12 +5,8 @@ ext {
appName = 'Tachiyomi: MangaShow.Me'
pkgNameSuffix = 'ko.mangashowme'
extClass = '.MangaShowMe'
extVersionCode = 6
extVersionCode = 7
libVersion = '1.2'
}
dependencies {
compileOnly project(':duktape-stub')
}
apply from: "$rootDir/common.gradle"

View File

@ -24,7 +24,7 @@ import java.util.concurrent.TimeUnit
**/
class MangaShowMe : ParsedHttpSource() {
override val name = "MangaShow.Me"
override val baseUrl = "https://mangashow3.me"
override val baseUrl = "https://mangashow5.me"
override val lang: String = "ko"
// Latest updates currently returns duplicate manga as it separates manga into chapters
@ -212,8 +212,11 @@ class MangaShowMe : ParsedHttpSource() {
(0 until imageUrls.length())
.map { imageUrls.getString(it) }
.map {
it.replace(".mangashow.me", ".mangashow3.me")
.replace(".mangashow2.me", ".mangashow3.me")
val curr = ".mangashow5.me"
it
.replace(".mangashow.me", curr)
.replace(".mangashow2.me", curr)
.replace(".mangashow3.me", curr)
}
.forEach { pages.add(Page(pages.size, "", decoder.request(it))) }
} catch (e: Exception) {

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: NewToki'
pkgNameSuffix = 'ko.newtoki'
extClass = '.NewToki'
extVersionCode = 4
extVersionCode = 5
libVersion = '1.2'
}

View File

@ -18,7 +18,7 @@ import java.util.*
**/
class NewToki : ParsedHttpSource() {
override val name = "NewToki"
override val baseUrl = "https://newtoki2.net"
override val baseUrl = "https://newtoki3.net"
override val lang: String = "ko"
// Latest updates currently returns duplicate manga as it separates manga into chapters