Update Korean extensions (#987)
All of Korean Extensions except ManhwaHand: Update domain. (Fix #961 for S.Korea users) ------ MSM: Re-branded to ManaMoa JMana, NewToki: Support Latest
This commit is contained in:
parent
e3cdc833b7
commit
62db2f5e67
|
@ -5,7 +5,7 @@ ext {
|
|||
appName = 'Tachiyomi: JMana'
|
||||
pkgNameSuffix = 'ko.jmana'
|
||||
extClass = '.JMana'
|
||||
extVersionCode = 5
|
||||
extVersionCode = 6
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -16,21 +16,22 @@ import java.text.SimpleDateFormat
|
|||
**/
|
||||
class JMana : ParsedHttpSource() {
|
||||
override val name = "JMana"
|
||||
override val baseUrl = "https://jmana5.com"
|
||||
override val baseUrl = "https://mangahide.com"
|
||||
override val lang: String = "ko"
|
||||
|
||||
// Latest updates currently returns duplicate manga as it separates manga into chapters
|
||||
override val supportsLatest = false
|
||||
override val supportsLatest = true
|
||||
override val client: OkHttpClient = network.cloudflareClient
|
||||
|
||||
override fun popularMangaSelector() = "div.conts > ul > li"
|
||||
|
||||
override fun popularMangaFromElement(element: Element): SManga {
|
||||
val linkElement = element.select("a")
|
||||
val titleElement = element.select(".titBox .price").first()
|
||||
val titleElement = element.select(".titBox > span").first()
|
||||
val link = linkElement.attr("href")
|
||||
.replace(" ", "%20")
|
||||
.replace(Regex("/[0-9]+(?!.*?/)"), "")
|
||||
|
||||
val manga = SManga.create()
|
||||
manga.setUrlWithoutDomain(linkElement.attr("href").replace(" ", "%20"))
|
||||
manga.setUrlWithoutDomain(link)
|
||||
manga.title = titleElement.text()
|
||||
manga.thumbnail_url = baseUrl + element.select(".imgBox img").attr("src")
|
||||
return manga
|
||||
|
@ -39,7 +40,7 @@ class JMana : ParsedHttpSource() {
|
|||
override fun popularMangaNextPageSelector() = "div.page > ul > li"
|
||||
|
||||
// Do not add page parameter if page is 1 to prevent tracking.
|
||||
override fun popularMangaRequest(page: Int) = GET("$baseUrl/frame/?page=${page - 1}")
|
||||
override fun popularMangaRequest(page: Int) = GET("$baseUrl/comic_main_frame?page=${page - 1}")
|
||||
|
||||
override fun popularMangaParse(response: Response): MangasPage {
|
||||
val document = response.asJsoup()
|
||||
|
@ -62,7 +63,7 @@ class JMana : ParsedHttpSource() {
|
|||
override fun searchMangaFromElement(element: Element) = popularMangaFromElement(element)
|
||||
override fun searchMangaNextPageSelector() = popularMangaSelector()
|
||||
override fun searchMangaParse(response: Response) = popularMangaParse(response)
|
||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request = GET("$baseUrl/frame/?keyword=$query&page=${page - 1}")
|
||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request = GET("$baseUrl/comic_main_frame?keyword=$query&page=${page - 1}")
|
||||
|
||||
|
||||
override fun mangaDetailsParse(document: Document): SManga {
|
||||
|
@ -128,12 +129,11 @@ class JMana : ParsedHttpSource() {
|
|||
return pages
|
||||
}
|
||||
|
||||
// Latest not supported
|
||||
override fun latestUpdatesSelector() = throw UnsupportedOperationException("This method should not be called!")
|
||||
|
||||
override fun latestUpdatesFromElement(element: Element) = throw UnsupportedOperationException("This method should not be called!")
|
||||
override fun latestUpdatesRequest(page: Int) = throw UnsupportedOperationException("This method should not be called!")
|
||||
override fun latestUpdatesNextPageSelector() = throw UnsupportedOperationException("This method should not be called!")
|
||||
override fun latestUpdatesSelector() = popularMangaSelector()
|
||||
override fun latestUpdatesParse(response: Response) = popularMangaParse(response)
|
||||
override fun latestUpdatesFromElement(element: Element) = popularMangaFromElement(element)
|
||||
override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/frame")
|
||||
override fun latestUpdatesNextPageSelector() = ""
|
||||
|
||||
|
||||
//We are able to get the image URL directly from the page list
|
||||
|
|
|
@ -2,10 +2,10 @@ apply plugin: 'com.android.application'
|
|||
apply plugin: 'kotlin-android'
|
||||
|
||||
ext {
|
||||
appName = 'Tachiyomi: MangaShow.Me'
|
||||
appName = 'Tachiyomi: ManaMoa (MangaShow.Me)'
|
||||
pkgNameSuffix = 'ko.mangashowme'
|
||||
extClass = '.MangaShowMe'
|
||||
extVersionCode = 7
|
||||
extVersionCode = 8
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -11,8 +11,7 @@ import okhttp3.Request
|
|||
private class TextField(name: String, val key: String) : Filter.Text(name)
|
||||
private class SearchCheckBox(val id: Int, name: String) : Filter.CheckBox(name)
|
||||
|
||||
private class SearchFieldMatch : Filter.Select<String>("Search Match", arrayOf("Not Set", "AND", "OR"))
|
||||
private class SearchTagMatch : Filter.Select<String>("Tag Match", arrayOf("AND", "OR"))
|
||||
private class SearchMatch : Filter.Select<String>("Match", arrayOf("AND", "OR"))
|
||||
private class SearchGenresList(genres: List<SearchCheckBox>) : Filter.Group<SearchCheckBox>("Genres", genres)
|
||||
private class SearchNamingList : Filter.Select<String>("Naming", searchNaming())
|
||||
private class SearchStatusList : Filter.Select<String>("Status", searchStatus())
|
||||
|
@ -93,41 +92,22 @@ fun getFilters() = FilterList(
|
|||
SearchStatusList(),
|
||||
SearchGenresList(searchGenres()),
|
||||
Filter.Separator(),
|
||||
SearchFieldMatch(),
|
||||
SearchTagMatch(),
|
||||
SearchMatch(),
|
||||
Filter.Separator(),
|
||||
TextField("Author/Artist (Exact Search)", "author")
|
||||
)
|
||||
|
||||
fun searchComplexFilterMangaRequestBuilder(baseUrl: String, page: Int, query: String, filters: FilterList): Request {
|
||||
// normal search function.
|
||||
fun normalSearch(state: Int = 0): Request {
|
||||
val url = HttpUrl.parse("$baseUrl/bbs/search.php?url=$baseUrl/bbs/search.php")!!.newBuilder()
|
||||
|
||||
if (state > 0) {
|
||||
url.addQueryParameter("sop", arrayOf("and", "or")[state - 1])
|
||||
}
|
||||
|
||||
url.addQueryParameter("stx", query)
|
||||
|
||||
if (page > 1) {
|
||||
url.addQueryParameter("page", "${page - 1}")
|
||||
}
|
||||
|
||||
return GET(url.toString())
|
||||
}
|
||||
|
||||
var nameFilter: Int? = null
|
||||
var statusFilter: Int? = null
|
||||
val genresFilter = mutableListOf<String>()
|
||||
var matchFieldFilter = 0
|
||||
var matchTagFilter = 1
|
||||
var matchFilter = 1
|
||||
var authorFilter: String? = null
|
||||
|
||||
filters.forEach { filter ->
|
||||
when (filter) {
|
||||
is SearchFieldMatch -> {
|
||||
matchFieldFilter = filter.state
|
||||
is SearchMatch -> {
|
||||
matchFilter = filter.state
|
||||
}
|
||||
|
||||
is TextField -> {
|
||||
|
@ -144,12 +124,6 @@ fun searchComplexFilterMangaRequestBuilder(baseUrl: String, page: Int, query: St
|
|||
|
||||
filters.forEach { filter ->
|
||||
when (filter) {
|
||||
is SearchTagMatch -> {
|
||||
if (filter.state > 0) {
|
||||
matchTagFilter = filter.state + 1
|
||||
}
|
||||
}
|
||||
|
||||
is SearchNamingList -> {
|
||||
if (filter.state > 0) {
|
||||
nameFilter = filter.state - 1
|
||||
|
@ -172,17 +146,13 @@ fun searchComplexFilterMangaRequestBuilder(baseUrl: String, page: Int, query: St
|
|||
}
|
||||
}
|
||||
|
||||
// If Query is over 2 length, just go to normal search
|
||||
if (query.length > 1) {
|
||||
return normalSearch(matchFieldFilter)
|
||||
}
|
||||
|
||||
if (nameFilter == null && statusFilter == null && genresFilter.isEmpty()) {
|
||||
if (query.isEmpty() && nameFilter == null && statusFilter == null && genresFilter.isEmpty()) {
|
||||
return GET("$baseUrl/bbs/page.php?hid=manga_list")
|
||||
}
|
||||
|
||||
val url = HttpUrl.parse("$baseUrl/bbs/page.php?hid=manga_list")!!.newBuilder()
|
||||
url.addQueryParameter("search_type", matchTagFilter.toString())
|
||||
url.addQueryParameter("search_type", matchFilter.toString())
|
||||
url.addQueryParameter("_0", query)
|
||||
url.addQueryParameter("_1", nameFilter?.toString() ?: "")
|
||||
url.addQueryParameter("_2", statusFilter?.toString() ?: "")
|
||||
url.addQueryParameter("_3", genresFilter.joinToString(","))
|
||||
|
|
|
@ -7,6 +7,7 @@ import android.graphics.Rect
|
|||
import eu.kanade.tachiyomi.network.GET
|
||||
import okhttp3.*
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.IOException
|
||||
import java.io.InputStream
|
||||
|
||||
/*
|
||||
|
@ -60,7 +61,7 @@ internal class ImageDecoderInterceptor : Interceptor {
|
|||
response.newBuilder().body(rb).build()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
chain.proceed(req)
|
||||
throw IOException("Image decoder failure.", e)
|
||||
}
|
||||
} else {
|
||||
chain.proceed(req)
|
||||
|
|
|
@ -23,8 +23,8 @@ import java.util.concurrent.TimeUnit
|
|||
* `manga_list` returns latest 'added' manga. not a chapter updates.
|
||||
**/
|
||||
class MangaShowMe : ParsedHttpSource() {
|
||||
override val name = "MangaShow.Me"
|
||||
override val baseUrl = "https://mangashow5.me"
|
||||
override val name = "ManaMoa (MangaShow.Me)"
|
||||
override val baseUrl = "https://manamoa.net"
|
||||
override val lang: String = "ko"
|
||||
|
||||
// Latest updates currently returns duplicate manga as it separates manga into chapters
|
||||
|
@ -68,7 +68,7 @@ class MangaShowMe : ParsedHttpSource() {
|
|||
|
||||
val manga = SManga.create()
|
||||
manga.url = urlTitleEscape(linkElement.attr("href"))
|
||||
manga.title = titleElement.text()
|
||||
manga.title = titleElement.text().trim()
|
||||
manga.thumbnail_url = urlFinder(element.select(".img-wrap-back").attr("style"))
|
||||
return manga
|
||||
}
|
||||
|
@ -211,13 +211,6 @@ class MangaShowMe : ParsedHttpSource() {
|
|||
|
||||
(0 until imageUrls.length())
|
||||
.map { imageUrls.getString(it) }
|
||||
.map {
|
||||
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) {
|
||||
e.printStackTrace()
|
||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
|||
appName = 'Tachiyomi: NewToki'
|
||||
pkgNameSuffix = 'ko.newtoki'
|
||||
extClass = '.NewToki'
|
||||
extVersionCode = 5
|
||||
extVersionCode = 6
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -18,28 +18,10 @@ import java.util.*
|
|||
**/
|
||||
class NewToki : ParsedHttpSource() {
|
||||
override val name = "NewToki"
|
||||
override val baseUrl = "https://newtoki3.net"
|
||||
override val baseUrl = "https://newtoki7.net"
|
||||
override val lang: String = "ko"
|
||||
|
||||
// Latest updates currently returns duplicate manga as it separates manga into chapters
|
||||
override val supportsLatest = false
|
||||
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
|
||||
.addInterceptor { chain ->
|
||||
val req = chain.request()
|
||||
var res: Response? = null
|
||||
|
||||
for (_i in 0..10) {
|
||||
try {
|
||||
res = chain.proceed(req)
|
||||
} catch (e: javax.net.ssl.SSLHandshakeException) {
|
||||
if (e.message!!.contains("Connection reset by peer")) continue
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
res ?: chain.proceed(req)
|
||||
}
|
||||
.build()!!
|
||||
override val supportsLatest = true
|
||||
override val client: OkHttpClient = network.cloudflareClient
|
||||
|
||||
|
||||
override fun popularMangaSelector() = "div#webtoon-list > ul > li"
|
||||
|
@ -192,12 +174,11 @@ class NewToki : ParsedHttpSource() {
|
|||
}
|
||||
|
||||
|
||||
// Latest not supported
|
||||
override fun latestUpdatesSelector() = throw UnsupportedOperationException("This method should not be called!")
|
||||
|
||||
override fun latestUpdatesFromElement(element: Element) = throw UnsupportedOperationException("This method should not be called!")
|
||||
override fun latestUpdatesRequest(page: Int) = throw UnsupportedOperationException("This method should not be called!")
|
||||
override fun latestUpdatesNextPageSelector() = throw UnsupportedOperationException("This method should not be called!")
|
||||
override fun latestUpdatesSelector() = popularMangaSelector()
|
||||
override fun latestUpdatesFromElement(element: Element) = popularMangaFromElement(element)
|
||||
override fun latestUpdatesRequest(page: Int) = popularMangaRequest(page)
|
||||
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
||||
override fun latestUpdatesParse(response: Response) = popularMangaParse(response)
|
||||
|
||||
|
||||
//We are able to get the image URL directly from the page list
|
||||
|
|
Loading…
Reference in New Issue