|
|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package org.koitharu.kotatsu.parsers.site.vi
|
|
|
|
|
|
|
|
|
|
import androidx.collection.arraySetOf
|
|
|
|
|
import kotlinx.coroutines.async
|
|
|
|
|
import kotlinx.coroutines.coroutineScope
|
|
|
|
|
import okhttp3.HttpUrl.Companion.toHttpUrl
|
|
|
|
|
@ -47,151 +48,15 @@ internal class CuuTruyenParser(context: MangaLoaderContext) :
|
|
|
|
|
|
|
|
|
|
override val filterCapabilities: MangaListFilterCapabilities
|
|
|
|
|
get() = MangaListFilterCapabilities(
|
|
|
|
|
isMultipleTagsSupported = false,
|
|
|
|
|
isSearchSupported = true,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
override suspend fun getFilterOptions(): MangaListFilterOptions {
|
|
|
|
|
return MangaListFilterOptions(
|
|
|
|
|
availableTags = tagList.map { MangaTag(it.name, it.id, source) }.toSet(),
|
|
|
|
|
availableTags = availableTags(),
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private data class Tag(val name: String, val id: String)
|
|
|
|
|
|
|
|
|
|
private val tagList = listOf(
|
|
|
|
|
Tag("Tất cả", ""),
|
|
|
|
|
Tag("Manga", "manga"),
|
|
|
|
|
Tag("Đang tiến hành", "dang-tien-hanh"),
|
|
|
|
|
Tag("Thể thao", "the-thao"),
|
|
|
|
|
Tag("Hài hước", "hai-huoc"),
|
|
|
|
|
Tag("Shounen", "shounen"),
|
|
|
|
|
Tag("Học đường", "hoc-duong"),
|
|
|
|
|
Tag("Chất lượng cao", "chat-luong-cao"),
|
|
|
|
|
Tag("Comedy", "comedy"),
|
|
|
|
|
Tag("Action", "action"),
|
|
|
|
|
Tag("Horror", "horror"),
|
|
|
|
|
Tag("Sci-fi", "sci-fi"),
|
|
|
|
|
Tag("Aliens", "aliens"),
|
|
|
|
|
Tag("Martial Arts", "martial-arts"),
|
|
|
|
|
Tag("Military", "military"),
|
|
|
|
|
Tag("Monsters", "monsters"),
|
|
|
|
|
Tag("Supernatural", "supernatural"),
|
|
|
|
|
Tag("Web Comic", "web-comic"),
|
|
|
|
|
Tag("Phiêu lưu", "phieu-luu"),
|
|
|
|
|
Tag("Hậu tận thế", "hau-tan-the"),
|
|
|
|
|
Tag("Hành động", "hanh-dong"),
|
|
|
|
|
Tag("Đã hoàn thành", "da-hoan-thanh"),
|
|
|
|
|
Tag("Sinh tồn", "sinh-ton"),
|
|
|
|
|
Tag("Du hành thời gian", "du-hanh-thoi-gian"),
|
|
|
|
|
Tag("Khoa học", "khoa-hoc"),
|
|
|
|
|
Tag("Tạm ngưng", "tam-ngung"),
|
|
|
|
|
Tag("NSFW", "nsfw"),
|
|
|
|
|
Tag("Bạo lực", "bao-luc"),
|
|
|
|
|
Tag("Khoả thân", "khoa-than"),
|
|
|
|
|
Tag("Bí ẩn", "bi-an"),
|
|
|
|
|
Tag("Trinh thám", "trinh-tham"),
|
|
|
|
|
Tag("Kinh dị", "kinh-di"),
|
|
|
|
|
Tag("Máu me", "mau-me"),
|
|
|
|
|
Tag("Tình dục", "tinh-duc"),
|
|
|
|
|
Tag("Có màu", "co-mau"),
|
|
|
|
|
Tag("Manhwa", "manhwa"),
|
|
|
|
|
Tag("Webtoon", "webtoon"),
|
|
|
|
|
Tag("Siêu nhiên", "sieu-nhien"),
|
|
|
|
|
Tag("Fantasy", "fantasy"),
|
|
|
|
|
Tag("Võ thuật", "vo-thuat"),
|
|
|
|
|
Tag("Drama", "drama"),
|
|
|
|
|
Tag("Hệ thống", "he-thong"),
|
|
|
|
|
Tag("Lãng mạn", "lang-man"),
|
|
|
|
|
Tag("Đời thường", "doi-thuong"),
|
|
|
|
|
Tag("Công sở", "cong-so"),
|
|
|
|
|
Tag("Sát thủ", "sat-thu"),
|
|
|
|
|
Tag("Phép thuật", "phep-thuat"),
|
|
|
|
|
Tag("Tội phạm", "toi-pham"),
|
|
|
|
|
Tag("Seinen", "seinen"),
|
|
|
|
|
Tag("Isekai", "isekai"),
|
|
|
|
|
Tag("Chuyển sinh", "chuyen-sinh"),
|
|
|
|
|
Tag("Harem", "harem"),
|
|
|
|
|
Tag("Mecha", "mecha"),
|
|
|
|
|
Tag("Trung cổ", "trung-co"),
|
|
|
|
|
Tag("LGBT", "lgbt"),
|
|
|
|
|
Tag("Yaoi", "yaoi"),
|
|
|
|
|
Tag("Game", "game"),
|
|
|
|
|
Tag("Bi kịch", "bi-kich"),
|
|
|
|
|
Tag("Động vật", "dong-vat"),
|
|
|
|
|
Tag("Tâm lý", "tam-ly"),
|
|
|
|
|
Tag("Manhua", "manhua"),
|
|
|
|
|
Tag("Nam biến nữ", "nam-bien-nu"),
|
|
|
|
|
Tag("Romcom", "romcom"),
|
|
|
|
|
Tag("Award Winning", "award-winning"),
|
|
|
|
|
Tag("Oneshot", "oneshot"),
|
|
|
|
|
Tag("Khoa học viễn tưởng", "khoa-hoc-vien-tuong"),
|
|
|
|
|
Tag("Dark Fantasy", "dark-fantasy"),
|
|
|
|
|
Tag("Zombie", "zombie"),
|
|
|
|
|
Tag("Nam x Nam", "nam-x-nam"),
|
|
|
|
|
Tag("Giật gân", "giat-gan"),
|
|
|
|
|
Tag("Cảnh sát", "canh-sat"),
|
|
|
|
|
Tag("NTR", "ntr"),
|
|
|
|
|
Tag("Cooking", "cooking"),
|
|
|
|
|
Tag("Ẩm thực", "am-thuc"),
|
|
|
|
|
Tag("Ecchi", "ecchi"),
|
|
|
|
|
Tag("Quái vật", "quai-vat"),
|
|
|
|
|
Tag("Vampires", "vampires"),
|
|
|
|
|
Tag("Nam giả nữ", "nam-gia-nu"),
|
|
|
|
|
Tag("Yakuza", "yakuza"),
|
|
|
|
|
Tag("Romance", "romance"),
|
|
|
|
|
Tag("Sport", "sport"),
|
|
|
|
|
Tag("Shoujo", "shoujo"),
|
|
|
|
|
Tag("Ninja", "ninja"),
|
|
|
|
|
Tag("Lịch sử", "lich-su"),
|
|
|
|
|
Tag("Doujinshi", "doujinshi"),
|
|
|
|
|
Tag("Databook", "databook"),
|
|
|
|
|
Tag("Adventure", "adventure"),
|
|
|
|
|
Tag("Y học", "y-hoc"),
|
|
|
|
|
Tag("Miễn bản quyền", "mien-ban-quyen"),
|
|
|
|
|
Tag("Josei", "josei"),
|
|
|
|
|
Tag("Psychological", "psychological"),
|
|
|
|
|
Tag("Anime", "anime"),
|
|
|
|
|
Tag("Yuri", "yuri"),
|
|
|
|
|
Tag("Yonkoma", "yonkoma"),
|
|
|
|
|
Tag("Quân đội", "quan-doi"),
|
|
|
|
|
Tag("Nữ giả nam", "nu-gia-nam"),
|
|
|
|
|
Tag("Chính trị", "chinh-tri"),
|
|
|
|
|
Tag("Tuyển tập", "tuyen-tap"),
|
|
|
|
|
Tag("Tu tiên", "tu-tien"),
|
|
|
|
|
Tag("Vô CP", "vo-cp"),
|
|
|
|
|
Tag("Xuyên không", "xuyen-khong"),
|
|
|
|
|
Tag("Việt Nam", "viet-nam"),
|
|
|
|
|
Tag("Toán học", "toan-hoc"),
|
|
|
|
|
Tag("Thiếu niên", "thieu-nien"),
|
|
|
|
|
Tag("Tình yêu", "tinh-yeu"),
|
|
|
|
|
Tag("Chính kịch", "chinh-kich"),
|
|
|
|
|
Tag("Ngọt ngào", "ngot-ngao"),
|
|
|
|
|
Tag("Wholesome", "wholesome"),
|
|
|
|
|
Tag("Smut", "smut"),
|
|
|
|
|
Tag("Gore", "gore"),
|
|
|
|
|
Tag("School Life", "school-life"),
|
|
|
|
|
Tag("Slice of Life", "slice-of-life"),
|
|
|
|
|
Tag("Tragedy", "tragedy"),
|
|
|
|
|
Tag("Mystery", "mystery"),
|
|
|
|
|
Tag("Atlus", "atlus"),
|
|
|
|
|
Tag("Sega", "sega"),
|
|
|
|
|
Tag("RPG", "rpg"),
|
|
|
|
|
Tag("Chuyển thể", "chuyen-the"),
|
|
|
|
|
Tag("Historical", "historical"),
|
|
|
|
|
Tag("Medical", "medical"),
|
|
|
|
|
Tag("Ghosts", "ghosts"),
|
|
|
|
|
Tag("Thriller", "thriller"),
|
|
|
|
|
Tag("Animals", "animals"),
|
|
|
|
|
Tag("Survival", "survival"),
|
|
|
|
|
Tag("Samurai", "samurai"),
|
|
|
|
|
Tag("Virtual Reality", "virtual-reality"),
|
|
|
|
|
Tag("Video Games", "video-games"),
|
|
|
|
|
Tag("Monster Girls", "monster-girls"),
|
|
|
|
|
Tag("Adaption", "adaption"),
|
|
|
|
|
Tag("Idol", "idol"),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
override suspend fun getListPage(page: Int, order: SortOrder, filter: MangaListFilter): List<Manga> {
|
|
|
|
|
val url = buildString {
|
|
|
|
|
append("https://")
|
|
|
|
|
@ -361,6 +226,139 @@ internal class CuuTruyenParser(context: MangaLoaderContext) :
|
|
|
|
|
}.toByteArray()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private fun availableTags() = arraySetOf(
|
|
|
|
|
MangaTag("Tất cả", "", source),
|
|
|
|
|
MangaTag("Manga", "manga", source),
|
|
|
|
|
MangaTag("Đang tiến hành", "dang-tien-hanh", source),
|
|
|
|
|
MangaTag("Thể thao", "the-thao", source),
|
|
|
|
|
MangaTag("Hài hước", "hai-huoc", source),
|
|
|
|
|
MangaTag("Shounen", "shounen", source),
|
|
|
|
|
MangaTag("Học đường", "hoc-duong", source),
|
|
|
|
|
MangaTag("Chất lượng cao", "chat-luong-cao", source),
|
|
|
|
|
MangaTag("Comedy", "comedy", source),
|
|
|
|
|
MangaTag("Action", "action", source),
|
|
|
|
|
MangaTag("Horror", "horror", source),
|
|
|
|
|
MangaTag("Sci-fi", "sci-fi", source),
|
|
|
|
|
MangaTag("Aliens", "aliens", source),
|
|
|
|
|
MangaTag("Martial Arts", "martial-arts", source),
|
|
|
|
|
MangaTag("Military", "military", source),
|
|
|
|
|
MangaTag("Monsters", "monsters", source),
|
|
|
|
|
MangaTag("Supernatural", "supernatural", source),
|
|
|
|
|
MangaTag("Web Comic", "web-comic", source),
|
|
|
|
|
MangaTag("Phiêu lưu", "phieu-luu", source),
|
|
|
|
|
MangaTag("Hậu tận thế", "hau-tan-the", source),
|
|
|
|
|
MangaTag("Hành động", "hanh-dong", source),
|
|
|
|
|
MangaTag("Đã hoàn thành", "da-hoan-thanh", source),
|
|
|
|
|
MangaTag("Sinh tồn", "sinh-ton", source),
|
|
|
|
|
MangaTag("Du hành thời gian", "du-hanh-thoi-gian", source),
|
|
|
|
|
MangaTag("Khoa học", "khoa-hoc", source),
|
|
|
|
|
MangaTag("Tạm ngưng", "tam-ngung", source),
|
|
|
|
|
MangaTag("NSFW", "nsfw", source),
|
|
|
|
|
MangaTag("Bạo lực", "bao-luc", source),
|
|
|
|
|
MangaTag("Khoả thân", "khoa-than", source),
|
|
|
|
|
MangaTag("Bí ẩn", "bi-an", source),
|
|
|
|
|
MangaTag("Trinh thám", "trinh-tham", source),
|
|
|
|
|
MangaTag("Kinh dị", "kinh-di", source),
|
|
|
|
|
MangaTag("Máu me", "mau-me", source),
|
|
|
|
|
MangaTag("Tình dục", "tinh-duc", source),
|
|
|
|
|
MangaTag("Có màu", "co-mau", source),
|
|
|
|
|
MangaTag("Manhwa", "manhwa", source),
|
|
|
|
|
MangaTag("Webtoon", "webtoon", source),
|
|
|
|
|
MangaTag("Siêu nhiên", "sieu-nhien", source),
|
|
|
|
|
MangaTag("Fantasy", "fantasy", source),
|
|
|
|
|
MangaTag("Võ thuật", "vo-thuat", source),
|
|
|
|
|
MangaTag("Drama", "drama", source),
|
|
|
|
|
MangaTag("Hệ thống", "he-thong", source),
|
|
|
|
|
MangaTag("Lãng mạn", "lang-man", source),
|
|
|
|
|
MangaTag("Đời thường", "doi-thuong", source),
|
|
|
|
|
MangaTag("Công sở", "cong-so", source),
|
|
|
|
|
MangaTag("Sát thủ", "sat-thu", source),
|
|
|
|
|
MangaTag("Phép thuật", "phep-thuat", source),
|
|
|
|
|
MangaTag("Tội phạm", "toi-pham", source),
|
|
|
|
|
MangaTag("Seinen", "seinen", source),
|
|
|
|
|
MangaTag("Isekai", "isekai", source),
|
|
|
|
|
MangaTag("Chuyển sinh", "chuyen-sinh", source),
|
|
|
|
|
MangaTag("Harem", "harem", source),
|
|
|
|
|
MangaTag("Mecha", "mecha", source),
|
|
|
|
|
MangaTag("Trung cổ", "trung-co", source),
|
|
|
|
|
MangaTag("LGBT", "lgbt", source),
|
|
|
|
|
MangaTag("Yaoi", "yaoi", source),
|
|
|
|
|
MangaTag("Game", "game", source),
|
|
|
|
|
MangaTag("Bi kịch", "bi-kich", source),
|
|
|
|
|
MangaTag("Động vật", "dong-vat", source),
|
|
|
|
|
MangaTag("Tâm lý", "tam-ly", source),
|
|
|
|
|
MangaTag("Manhua", "manhua", source),
|
|
|
|
|
MangaTag("Nam biến nữ", "nam-bien-nu", source),
|
|
|
|
|
MangaTag("Romcom", "romcom", source),
|
|
|
|
|
MangaTag("Award Winning", "award-winning", source),
|
|
|
|
|
MangaTag("Oneshot", "oneshot", source),
|
|
|
|
|
MangaTag("Khoa học viễn tưởng", "khoa-hoc-vien-tuong", source),
|
|
|
|
|
MangaTag("Dark Fantasy", "dark-fantasy", source),
|
|
|
|
|
MangaTag("Zombie", "zombie", source),
|
|
|
|
|
MangaTag("Nam x Nam", "nam-x-nam", source),
|
|
|
|
|
MangaTag("Giật gân", "giat-gan", source),
|
|
|
|
|
MangaTag("Cảnh sát", "canh-sat", source),
|
|
|
|
|
MangaTag("NTR", "ntr", source),
|
|
|
|
|
MangaTag("Cooking", "cooking", source),
|
|
|
|
|
MangaTag("Ẩm thực", "am-thuc", source),
|
|
|
|
|
MangaTag("Ecchi", "ecchi", source),
|
|
|
|
|
MangaTag("Quái vật", "quai-vat", source),
|
|
|
|
|
MangaTag("Vampires", "vampires", source),
|
|
|
|
|
MangaTag("Nam giả nữ", "nam-gia-nu", source),
|
|
|
|
|
MangaTag("Yakuza", "yakuza", source),
|
|
|
|
|
MangaTag("Romance", "romance", source),
|
|
|
|
|
MangaTag("Sport", "sport", source),
|
|
|
|
|
MangaTag("Shoujo", "shoujo", source),
|
|
|
|
|
MangaTag("Ninja", "ninja", source),
|
|
|
|
|
MangaTag("Lịch sử", "lich-su", source),
|
|
|
|
|
MangaTag("Doujinshi", "doujinshi", source),
|
|
|
|
|
MangaTag("Databook", "databook", source),
|
|
|
|
|
MangaTag("Adventure", "adventure", source),
|
|
|
|
|
MangaTag("Y học", "y-hoc", source),
|
|
|
|
|
MangaTag("Miễn bản quyền", "mien-ban-quyen", source),
|
|
|
|
|
MangaTag("Josei", "josei", source),
|
|
|
|
|
MangaTag("Psychological", "psychological", source),
|
|
|
|
|
MangaTag("Anime", "anime", source),
|
|
|
|
|
MangaTag("Yuri", "yuri", source),
|
|
|
|
|
MangaTag("Yonkoma", "yonkoma", source),
|
|
|
|
|
MangaTag("Quân đội", "quan-doi", source),
|
|
|
|
|
MangaTag("Nữ giả nam", "nu-gia-nam", source),
|
|
|
|
|
MangaTag("Chính trị", "chinh-tri", source),
|
|
|
|
|
MangaTag("Tuyển tập", "tuyen-tap", source),
|
|
|
|
|
MangaTag("Tu tiên", "tu-tien", source),
|
|
|
|
|
MangaTag("Vô CP", "vo-cp", source),
|
|
|
|
|
MangaTag("Xuyên không", "xuyen-khong", source),
|
|
|
|
|
MangaTag("Việt Nam", "viet-nam", source),
|
|
|
|
|
MangaTag("Toán học", "toan-hoc", source),
|
|
|
|
|
MangaTag("Thiếu niên", "thieu-nien", source),
|
|
|
|
|
MangaTag("Tình yêu", "tinh-yeu", source),
|
|
|
|
|
MangaTag("Chính kịch", "chinh-kich", source),
|
|
|
|
|
MangaTag("Ngọt ngào", "ngot-ngao", source),
|
|
|
|
|
MangaTag("Wholesome", "wholesome", source),
|
|
|
|
|
MangaTag("Smut", "smut", source),
|
|
|
|
|
MangaTag("Gore", "gore", source),
|
|
|
|
|
MangaTag("School Life", "school-life", source),
|
|
|
|
|
MangaTag("Slice of Life", "slice-of-life", source),
|
|
|
|
|
MangaTag("Tragedy", "tragedy", source),
|
|
|
|
|
MangaTag("Mystery", "mystery", source),
|
|
|
|
|
MangaTag("Atlus", "atlus", source),
|
|
|
|
|
MangaTag("Sega", "sega", source),
|
|
|
|
|
MangaTag("RPG", "rpg", source),
|
|
|
|
|
MangaTag("Chuyển thể", "chuyen-the", source),
|
|
|
|
|
MangaTag("Historical", "historical", source),
|
|
|
|
|
MangaTag("Medical", "medical", source),
|
|
|
|
|
MangaTag("Ghosts", "ghosts", source),
|
|
|
|
|
MangaTag("Thriller", "thriller", source),
|
|
|
|
|
MangaTag("Animals", "animals", source),
|
|
|
|
|
MangaTag("Survival", "survival", source),
|
|
|
|
|
MangaTag("Samurai", "samurai", source),
|
|
|
|
|
MangaTag("Virtual Reality", "virtual-reality", source),
|
|
|
|
|
MangaTag("Video Games", "video-games", source),
|
|
|
|
|
MangaTag("Monster Girls", "monster-girls", source),
|
|
|
|
|
MangaTag("Adaption", "adaption", source),
|
|
|
|
|
MangaTag("Idol", "idol", source),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
private companion object {
|
|
|
|
|
const val DRM_DATA_KEY = "drm_data="
|
|
|
|
|
const val DECRYPTION_KEY = "3141592653589793"
|
|
|
|
|
|