mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-26 04:03:01 +01:00
parent
bfe5f4217a
commit
f749db1b99
@ -3,7 +3,7 @@ ext {
|
||||
extClass = '.MangasNoSekai'
|
||||
themePkg = 'madara'
|
||||
baseUrl = 'https://mangasnosekai.com'
|
||||
overrideVersionCode = 5
|
||||
overrideVersionCode = 6
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
@ -4,6 +4,7 @@ import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.network.POST
|
||||
import eu.kanade.tachiyomi.network.interceptor.rateLimitHost
|
||||
import eu.kanade.tachiyomi.source.model.MangasPage
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
@ -39,20 +40,42 @@ class MangasNoSekai : Madara(
|
||||
val libraryUrl = document.selectFirst("li#menu-item-3116.menu-item > a[href]")
|
||||
|
||||
libraryUrl?.attr("href")?.removeSuffix("/")?.substringAfterLast("/")
|
||||
?: "manganewos"
|
||||
?: "manga"
|
||||
} catch (e: Exception) {
|
||||
"manganewos"
|
||||
"manga"
|
||||
}
|
||||
}
|
||||
|
||||
override fun popularMangaRequest(page: Int): Request {
|
||||
if (libraryPath.isBlank()) getLibraryPath()
|
||||
return GET("$baseUrl/$libraryPath/${searchPage(page)}?m_orderby=views", headers)
|
||||
return GET("$baseUrl/$libraryPath/#$page", headers)
|
||||
}
|
||||
|
||||
override fun popularMangaParse(response: Response): MangasPage {
|
||||
val page = response.request.url.fragment?.toIntOrNull() ?: 1
|
||||
val document = response.asJsoup()
|
||||
val orderValue = document.selectFirst("select#order_select > option:eq(5)")
|
||||
?.attr("value")
|
||||
?: "views2"
|
||||
val url = "$baseUrl/$libraryPath/${searchPage(page)}?m_orderby=$orderValue"
|
||||
val newResponse = client.newCall(GET(url, headers)).execute()
|
||||
return super.popularMangaParse(newResponse)
|
||||
}
|
||||
|
||||
override fun latestUpdatesRequest(page: Int): Request {
|
||||
if (libraryPath.isBlank()) getLibraryPath()
|
||||
return GET("$baseUrl/$libraryPath/${searchPage(page)}?m_orderby=latest", headers)
|
||||
return GET("$baseUrl/$libraryPath/#$page", headers)
|
||||
}
|
||||
|
||||
override fun latestUpdatesParse(response: Response): MangasPage {
|
||||
val page = response.request.url.fragment?.toIntOrNull() ?: 1
|
||||
val document = response.asJsoup()
|
||||
val orderValue = document.selectFirst("select#order_select > option:eq(1)")
|
||||
?.attr("value")
|
||||
?: "latest2"
|
||||
val url = "$baseUrl/$libraryPath/${searchPage(page)}?m_orderby=$orderValue"
|
||||
val newResponse = client.newCall(GET(url, headers)).execute()
|
||||
return super.popularMangaParse(newResponse)
|
||||
}
|
||||
|
||||
override fun popularMangaSelector() = "div.page-listing-item > div.row > div"
|
||||
|
Loading…
Reference in New Issue
Block a user