Update extensions due to sites update. (#846)
Update korean extensions due to sites update.
This commit is contained in:
parent
d424f590ee
commit
18407b4702
@ -5,7 +5,7 @@ ext {
|
|||||||
appName = 'Tachiyomi: JMana'
|
appName = 'Tachiyomi: JMana'
|
||||||
pkgNameSuffix = 'ko.jmana'
|
pkgNameSuffix = 'ko.jmana'
|
||||||
extClass = '.JMana'
|
extClass = '.JMana'
|
||||||
extVersionCode = 2
|
extVersionCode = 3
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ import org.jsoup.nodes.Element
|
|||||||
**/
|
**/
|
||||||
class JMana : ParsedHttpSource() {
|
class JMana : ParsedHttpSource() {
|
||||||
override val name = "JMana"
|
override val name = "JMana"
|
||||||
override val baseUrl = "https://www.jmana2.com"
|
override val baseUrl = "https://jmana1.com"
|
||||||
override val lang: String = "ko"
|
override val lang: String = "ko"
|
||||||
|
|
||||||
// Latest updates currently returns duplicate manga as it separates manga into chapters
|
// Latest updates currently returns duplicate manga as it separates manga into chapters
|
||||||
@ -29,7 +29,7 @@ class JMana : ParsedHttpSource() {
|
|||||||
val titleElement = element.select(".titBox .price").first()
|
val titleElement = element.select(".titBox .price").first()
|
||||||
|
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
manga.setUrlWithoutDomain(linkElement.attr("href"))
|
manga.setUrlWithoutDomain(linkElement.attr("href").replace(" ", "%20"))
|
||||||
manga.title = titleElement.text()
|
manga.title = titleElement.text()
|
||||||
manga.thumbnail_url = baseUrl + element.select(".imgBox img").attr("src")
|
manga.thumbnail_url = baseUrl + element.select(".imgBox img").attr("src")
|
||||||
return manga
|
return manga
|
||||||
@ -38,7 +38,7 @@ class JMana : ParsedHttpSource() {
|
|||||||
override fun popularMangaNextPageSelector() = "div.page > ul > li"
|
override fun popularMangaNextPageSelector() = "div.page > ul > li"
|
||||||
|
|
||||||
// Do not add page parameter if page is 1 to prevent tracking.
|
// Do not add page parameter if page is 1 to prevent tracking.
|
||||||
override fun popularMangaRequest(page: Int) = GET(baseUrl + if (page > 1) "/?page=${page - 1}" else "")
|
override fun popularMangaRequest(page: Int) = GET("$baseUrl/frame/?page=${page - 1}")
|
||||||
|
|
||||||
override fun popularMangaParse(response: Response): MangasPage {
|
override fun popularMangaParse(response: Response): MangasPage {
|
||||||
val document = response.asJsoup()
|
val document = response.asJsoup()
|
||||||
@ -61,7 +61,7 @@ class JMana : ParsedHttpSource() {
|
|||||||
override fun searchMangaFromElement(element: Element) = popularMangaFromElement(element)
|
override fun searchMangaFromElement(element: Element) = popularMangaFromElement(element)
|
||||||
override fun searchMangaNextPageSelector() = popularMangaSelector()
|
override fun searchMangaNextPageSelector() = popularMangaSelector()
|
||||||
override fun searchMangaParse(response: Response) = popularMangaParse(response)
|
override fun searchMangaParse(response: Response) = popularMangaParse(response)
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request = GET("$baseUrl/?keyword=$query" + if (page > 1) "&page=${page - 1}" else "")
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request = GET("$baseUrl/frame/?keyword=$query&page=${page - 1}")
|
||||||
|
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document): SManga {
|
override fun mangaDetailsParse(document: Document): SManga {
|
||||||
@ -84,7 +84,7 @@ class JMana : ParsedHttpSource() {
|
|||||||
val rawName = linkElement.text()
|
val rawName = linkElement.text()
|
||||||
|
|
||||||
val chapter = SChapter.create()
|
val chapter = SChapter.create()
|
||||||
chapter.url = linkElement.attr("href")
|
chapter.url = linkElement.attr("href").replace("book/", "book_frame/")
|
||||||
chapter.chapter_number = parseChapterNumber(rawName)
|
chapter.chapter_number = parseChapterNumber(rawName)
|
||||||
chapter.name = rawName.trim()
|
chapter.name = rawName.trim()
|
||||||
return chapter
|
return chapter
|
||||||
@ -117,7 +117,6 @@ class JMana : ParsedHttpSource() {
|
|||||||
return pages
|
return pages
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Latest not supported
|
// Latest not supported
|
||||||
override fun latestUpdatesSelector() = throw UnsupportedOperationException("This method should not be called!")
|
override fun latestUpdatesSelector() = throw UnsupportedOperationException("This method should not be called!")
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ ext {
|
|||||||
appName = 'Tachiyomi: MangaShow.Me'
|
appName = 'Tachiyomi: MangaShow.Me'
|
||||||
pkgNameSuffix = 'ko.mangashowme'
|
pkgNameSuffix = 'ko.mangashowme'
|
||||||
extClass = '.MangaShowMe'
|
extClass = '.MangaShowMe'
|
||||||
extVersionCode = 3
|
extVersionCode = 4
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,48 +8,50 @@ import okhttp3.Request
|
|||||||
|
|
||||||
|
|
||||||
// TODO: Completely Implement/Update Filters(Genre/Artist).
|
// TODO: Completely Implement/Update Filters(Genre/Artist).
|
||||||
// private class TextField(name: String, val key: String) : Filter.Text(name)
|
private class TextField(name: String, val key: String) : Filter.Text(name)
|
||||||
private class SearchCheckBox(val id: Int, name: String) : Filter.CheckBox(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 SearchFieldMatch : Filter.Select<String>("Search Match", arrayOf("Not Set", "AND", "OR"))
|
||||||
private class SearchTagMatch : Filter.Select<String>("Tag Match", arrayOf("AND", "OR"))
|
private class SearchTagMatch : Filter.Select<String>("Tag Match", arrayOf("AND", "OR"))
|
||||||
private class SearchGenresList(genres: List<SearchCheckBox>) : Filter.Group<SearchCheckBox>("Genres", genres)
|
private class SearchGenresList(genres: List<SearchCheckBox>) : Filter.Group<SearchCheckBox>("Genres", genres)
|
||||||
private class SearchNamingList(naming: List<SearchCheckBox>) : Filter.Group<SearchCheckBox>("Naming", naming)
|
private class SearchNamingList : Filter.Select<String>("Naming", searchNaming())
|
||||||
private class SearchStatusList(status: List<SearchCheckBox>) : Filter.Group<SearchCheckBox>("Status", status)
|
private class SearchStatusList : Filter.Select<String>("Status", searchStatus())
|
||||||
|
|
||||||
private fun searchNaming() = listOf(
|
private fun searchNaming() = arrayOf(
|
||||||
SearchCheckBox(0, "ㄱ"),
|
"Not Set",
|
||||||
SearchCheckBox(1, "ㄲ"),
|
"ㄱ",
|
||||||
SearchCheckBox(2, "ㄴ"),
|
"ㄲ",
|
||||||
SearchCheckBox(3, "ㄷ"),
|
"ㄴ",
|
||||||
SearchCheckBox(4, "ㄸ"),
|
"ㄷ",
|
||||||
SearchCheckBox(5, "ㄹ"),
|
"ㄸ",
|
||||||
SearchCheckBox(6, "ㅁ"),
|
"ㄹ",
|
||||||
SearchCheckBox(7, "ㅂ"),
|
"ㅁ",
|
||||||
SearchCheckBox(8, "ㅃ"),
|
"ㅂ",
|
||||||
SearchCheckBox(9, "ㅅ"),
|
"ㅃ",
|
||||||
SearchCheckBox(10, "ㅆ"),
|
"ㅅ",
|
||||||
SearchCheckBox(11, "ㅇ"),
|
"ㅆ",
|
||||||
SearchCheckBox(12, "ㅈ"),
|
"ㅇ",
|
||||||
SearchCheckBox(13, "ㅉ"),
|
"ㅈ",
|
||||||
SearchCheckBox(14, "ㅊ"),
|
"ㅉ",
|
||||||
SearchCheckBox(15, "ㅋ"),
|
"ㅊ",
|
||||||
SearchCheckBox(16, "ㅌ"),
|
"ㅋ",
|
||||||
SearchCheckBox(17, "ㅍ"),
|
"ㅌ",
|
||||||
SearchCheckBox(18, "ㅎ"),
|
"ㅍ",
|
||||||
SearchCheckBox(19, "A-Z"),
|
"ㅎ",
|
||||||
SearchCheckBox(20, "0-9")
|
"A-Z",
|
||||||
|
"0-9"
|
||||||
)
|
)
|
||||||
|
|
||||||
private fun searchStatus() = listOf(
|
private fun searchStatus() = arrayOf(
|
||||||
SearchCheckBox(0, "미분류"),
|
"Not Set",
|
||||||
SearchCheckBox(1, "주간"),
|
"미분류",
|
||||||
SearchCheckBox(2, "격주"),
|
"주간",
|
||||||
SearchCheckBox(3, "월간"),
|
"격주",
|
||||||
SearchCheckBox(4, "격월/비정기"),
|
"월간",
|
||||||
SearchCheckBox(5, "단편"),
|
"격월/비정기",
|
||||||
SearchCheckBox(6, "단행본"),
|
"단편",
|
||||||
SearchCheckBox(7, "완결")
|
"단행본",
|
||||||
|
"완결"
|
||||||
)
|
)
|
||||||
|
|
||||||
private fun searchGenres() = listOf(
|
private fun searchGenres() = listOf(
|
||||||
@ -87,14 +89,14 @@ private fun searchGenres() = listOf(
|
|||||||
)
|
)
|
||||||
|
|
||||||
fun getFilters() = FilterList(
|
fun getFilters() = FilterList(
|
||||||
SearchNamingList(searchNaming()),
|
SearchNamingList(),
|
||||||
SearchStatusList(searchStatus()),
|
SearchStatusList(),
|
||||||
SearchGenresList(searchGenres()),
|
SearchGenresList(searchGenres()),
|
||||||
Filter.Separator(),
|
Filter.Separator(),
|
||||||
SearchFieldMatch(),
|
SearchFieldMatch(),
|
||||||
SearchTagMatch()
|
SearchTagMatch(),
|
||||||
//Filter.Separator(),
|
Filter.Separator(),
|
||||||
//TextField("Author/Artist (Accurate full name)", "author")
|
TextField("Author/Artist (Exact Search)", "author")
|
||||||
)
|
)
|
||||||
|
|
||||||
fun searchComplexFilterMangaRequestBuilder(baseUrl: String, page: Int, query: String, filters: FilterList): Request {
|
fun searchComplexFilterMangaRequestBuilder(baseUrl: String, page: Int, query: String, filters: FilterList): Request {
|
||||||
@ -115,19 +117,30 @@ fun searchComplexFilterMangaRequestBuilder(baseUrl: String, page: Int, query: St
|
|||||||
return GET(url.toString())
|
return GET(url.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
val nameFilter = mutableListOf<Int>()
|
var nameFilter: Int? = null
|
||||||
val statusFilter = mutableListOf<Int>()
|
var statusFilter: Int? = null
|
||||||
val genresFilter = mutableListOf<String>()
|
val genresFilter = mutableListOf<String>()
|
||||||
var matchFieldFilter = 0
|
var matchFieldFilter = 0
|
||||||
var matchTagFilter = 1
|
var matchTagFilter = 1
|
||||||
|
var authorFilter: String? = null
|
||||||
|
|
||||||
filters.forEach { filter ->
|
filters.forEach { filter ->
|
||||||
when (filter) {
|
when (filter) {
|
||||||
is SearchFieldMatch -> {
|
is SearchFieldMatch -> {
|
||||||
matchFieldFilter = filter.state
|
matchFieldFilter = filter.state
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is TextField -> {
|
||||||
|
if (filter.key == "author" && !filter.state.isEmpty()) {
|
||||||
|
authorFilter = filter.state
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!authorFilter.isNullOrEmpty()) {
|
||||||
|
return GET("$baseUrl/bbs/page.php?hid=manga_list&sfl=4&stx=$authorFilter&page=${page - 1}")
|
||||||
|
}
|
||||||
|
|
||||||
filters.forEach { filter ->
|
filters.forEach { filter ->
|
||||||
when (filter) {
|
when (filter) {
|
||||||
@ -138,18 +151,14 @@ fun searchComplexFilterMangaRequestBuilder(baseUrl: String, page: Int, query: St
|
|||||||
}
|
}
|
||||||
|
|
||||||
is SearchNamingList -> {
|
is SearchNamingList -> {
|
||||||
filter.state.forEach {
|
if (filter.state > 0) {
|
||||||
if (it.state) {
|
nameFilter = filter.state - 1
|
||||||
nameFilter.add(it.id)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
is SearchStatusList -> {
|
is SearchStatusList -> {
|
||||||
filter.state.forEach {
|
if (filter.state > 0) {
|
||||||
if (it.state) {
|
statusFilter = filter.state - 1
|
||||||
statusFilter.add(it.id)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,14 +169,6 @@ fun searchComplexFilterMangaRequestBuilder(baseUrl: String, page: Int, query: St
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// is TextField -> {
|
|
||||||
// if (type == 4 && filter.key == "author") {
|
|
||||||
// if (filter.key.length > 1) {
|
|
||||||
// return GET("$baseUrl/bbs/page.php?hid=manga_list&sfl=4&stx=${filter.state}")
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,14 +177,14 @@ fun searchComplexFilterMangaRequestBuilder(baseUrl: String, page: Int, query: St
|
|||||||
return normalSearch(matchFieldFilter)
|
return normalSearch(matchFieldFilter)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nameFilter.isEmpty() && statusFilter.isEmpty() && genresFilter.isEmpty()) {
|
if (nameFilter == null && statusFilter == null && genresFilter.isEmpty()) {
|
||||||
return GET("$baseUrl/bbs/page.php?hid=manga_list")
|
return GET("$baseUrl/bbs/page.php?hid=manga_list")
|
||||||
}
|
}
|
||||||
|
|
||||||
val url = HttpUrl.parse("$baseUrl/bbs/page.php?hid=manga_list")!!.newBuilder()
|
val url = HttpUrl.parse("$baseUrl/bbs/page.php?hid=manga_list")!!.newBuilder()
|
||||||
url.addQueryParameter("search_type", matchTagFilter.toString())
|
url.addQueryParameter("search_type", matchTagFilter.toString())
|
||||||
url.addQueryParameter("_1", nameFilter.joinToString(","))
|
url.addQueryParameter("_1", nameFilter?.toString() ?: "")
|
||||||
url.addQueryParameter("_2", statusFilter.joinToString(","))
|
url.addQueryParameter("_2", statusFilter?.toString() ?: "")
|
||||||
url.addQueryParameter("_3", genresFilter.joinToString(","))
|
url.addQueryParameter("_3", genresFilter.joinToString(","))
|
||||||
if (page > 1) {
|
if (page > 1) {
|
||||||
url.addQueryParameter("page", "${page - 1}")
|
url.addQueryParameter("page", "${page - 1}")
|
||||||
|
@ -134,7 +134,6 @@ class MangaShowMe : ParsedHttpSource() {
|
|||||||
private fun parseStatus(status: String) = when (status.trim()) {
|
private fun parseStatus(status: String) = when (status.trim()) {
|
||||||
"주간", "격주", "월간", "격월/비정기", "단행본" -> SManga.ONGOING
|
"주간", "격주", "월간", "격월/비정기", "단행본" -> SManga.ONGOING
|
||||||
"단편", "완결" -> SManga.COMPLETED
|
"단편", "완결" -> SManga.COMPLETED
|
||||||
// "미분류", "" -> SManga.UNKNOWN
|
|
||||||
else -> SManga.UNKNOWN
|
else -> SManga.UNKNOWN
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,7 +155,7 @@ class MangaShowMe : ParsedHttpSource() {
|
|||||||
val rawName = linkElement.select("div.title").last()
|
val rawName = linkElement.select("div.title").last()
|
||||||
|
|
||||||
val chapter = SChapter.create()
|
val chapter = SChapter.create()
|
||||||
chapter.url = linkElement.attr("href")
|
chapter.setUrlWithoutDomain(linkElement.attr("href"))
|
||||||
chapter.chapter_number = parseChapterNumber(rawName.text())
|
chapter.chapter_number = parseChapterNumber(rawName.text())
|
||||||
chapter.name = rawName.ownText().trim()
|
chapter.name = rawName.ownText().trim()
|
||||||
chapter.date_upload = parseChapterDate(element.select("div.addedAt").text().split(" ").first())
|
chapter.date_upload = parseChapterDate(element.select("div.addedAt").text().split(" ").first())
|
||||||
@ -199,7 +198,7 @@ class MangaShowMe : ParsedHttpSource() {
|
|||||||
|
|
||||||
// They are using full url in every links.
|
// They are using full url in every links.
|
||||||
// There's possibility to using another domain for serve manga(s). Like marumaru.
|
// There's possibility to using another domain for serve manga(s). Like marumaru.
|
||||||
override fun pageListRequest(chapter: SChapter) = GET(chapter.url, headers)
|
//override fun pageListRequest(chapter: SChapter) = GET(chapter.url, headers)
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
val pages = mutableListOf<Page>()
|
val pages = mutableListOf<Page>()
|
||||||
|
@ -5,7 +5,7 @@ ext {
|
|||||||
appName = 'Tachiyomi: NewToki'
|
appName = 'Tachiyomi: NewToki'
|
||||||
pkgNameSuffix = 'ko.newtoki'
|
pkgNameSuffix = 'ko.newtoki'
|
||||||
extClass = '.NewToki'
|
extClass = '.NewToki'
|
||||||
extVersionCode = 3
|
extVersionCode = 4
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,21 +84,38 @@ class NewToki : ParsedHttpSource() {
|
|||||||
|
|
||||||
override fun mangaDetailsParse(document: Document): SManga {
|
override fun mangaDetailsParse(document: Document): SManga {
|
||||||
val info = document.select("div.view-title > .view-content").first()
|
val info = document.select("div.view-title > .view-content").first()
|
||||||
val authorText = info.select("span.label.btn-info").text()
|
val title = document.select("div.view-content > span > b").text()
|
||||||
val title = info.select("div.view-content > span[style] > b").text()
|
val descriptionElement = info.select("div.row div.view-content:not([style])")
|
||||||
val genres = mutableListOf<String>()
|
val description = descriptionElement.map {
|
||||||
info.select("span.label.label-success").forEach {
|
it.text().trim()
|
||||||
genres.add(it.text())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
manga.title = title
|
manga.title = title
|
||||||
manga.author = authorText
|
manga.description = description.joinToString("\n")
|
||||||
|
descriptionElement.forEach {
|
||||||
|
val text = it.text()
|
||||||
|
when {
|
||||||
|
"작가" in text -> manga.author = it.getElementsByTag("a").text()
|
||||||
|
"분류" in text -> {
|
||||||
|
val genres = mutableListOf<String>()
|
||||||
|
it.getElementsByTag("a").forEach { item ->
|
||||||
|
genres.add(item.text())
|
||||||
|
}
|
||||||
manga.genre = genres.joinToString(", ")
|
manga.genre = genres.joinToString(", ")
|
||||||
manga.status = SManga.UNKNOWN
|
}
|
||||||
|
"발행구분" in text -> manga.status = parseStatus(it.getElementsByTag("a").text())
|
||||||
|
}
|
||||||
|
}
|
||||||
return manga
|
return manga
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun parseStatus(status: String) = when (status.trim()) {
|
||||||
|
"주간", "격주", "월간", "격월/비정기", "단행본" -> SManga.ONGOING
|
||||||
|
"단편", "완결" -> SManga.COMPLETED
|
||||||
|
else -> SManga.UNKNOWN
|
||||||
|
}
|
||||||
|
|
||||||
override fun chapterListSelector() = "div.serial-list > ul.list-body > li.list-item"
|
override fun chapterListSelector() = "div.serial-list > ul.list-body > li.list-item"
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element): SChapter {
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user