diff --git a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ru/RemangaParser.kt b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ru/RemangaParser.kt index 1e1776e5..4b6a7c39 100644 --- a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ru/RemangaParser.kt +++ b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ru/RemangaParser.kt @@ -18,7 +18,6 @@ import org.koitharu.kotatsu.parsers.model.* import org.koitharu.kotatsu.parsers.network.UserAgents import org.koitharu.kotatsu.parsers.util.* import org.koitharu.kotatsu.parsers.util.json.* -import java.net.URLDecoder import java.text.DateFormat import java.text.SimpleDateFormat import java.util.* @@ -252,7 +251,7 @@ internal class RemangaParser( val userCookie = context.cookieJar.getCookies(domain).find { it.name == "user" } ?: return baseHeaders - val jo = JSONObject(URLDecoder.decode(userCookie.value, Charsets.UTF_8.name())) + val jo = JSONObject(userCookie.value.urlDecode()) val accessToken = jo.getStringOrNull("access_token") ?: return baseHeaders return baseHeaders.newBuilder().add("authorization", "bearer $accessToken").build() } diff --git a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ru/multichan/ChanParser.kt b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ru/multichan/ChanParser.kt index 7cf677fe..cc9a652d 100644 --- a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ru/multichan/ChanParser.kt +++ b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ru/multichan/ChanParser.kt @@ -57,7 +57,7 @@ internal abstract class ChanParser( row.selectFirst("div.genre")?.select("a")?.mapToSet { MangaTag( title = it.text().toTagName(), - key = it.attr("href").substringAfterLast('/').urlEncoded(), + key = it.attr("href").substringAfterLast('/').urlDecode(), source = source, ) } @@ -133,7 +133,7 @@ internal abstract class ChanParser( val a = li.children().lastOrNull() ?: li.parseFailed("a is null") MangaTag( title = a.text().toTagName(), - key = a.attr("href").substringAfterLast('/'), + key = a.attr("href").substringAfterLast('/').urlDecode(), source = source, ) } diff --git a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ru/multichan/HenChanParser.kt b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ru/multichan/HenChanParser.kt index 84997b56..c14b9d76 100644 --- a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ru/multichan/HenChanParser.kt +++ b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ru/multichan/HenChanParser.kt @@ -6,7 +6,6 @@ import org.koitharu.kotatsu.parsers.MangaSourceParser import org.koitharu.kotatsu.parsers.config.ConfigKey import org.koitharu.kotatsu.parsers.model.* import org.koitharu.kotatsu.parsers.util.* -import java.net.URLDecoder import java.util.* @MangaSourceParser("HENCHAN", "Хентай-тян", "ru", type = ContentType.HENTAI) @@ -40,7 +39,7 @@ internal class HenChanParser(context: MangaLoaderContext) : ChanParser(context, val a = it.children().last() ?: doc.parseFailed("Invalid tag") MangaTag( title = a.text().toTitleCase(), - key = URLDecoder.decode(a.attr("href").substringAfterLast('/'), "UTF-8"), + key = a.attr("href").substringAfterLast('/').urlDecode(), source = source, ) } ?: manga.tags, @@ -49,7 +48,8 @@ internal class HenChanParser(context: MangaLoaderContext) : ChanParser(context, id = generateUid(readLink), url = readLink, source = source, - number = 1, + number = 0f, + volume = 0, uploadDate = 0L, name = manga.title, scanlator = null, diff --git a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ru/multichan/YaoiChanParser.kt b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ru/multichan/YaoiChanParser.kt index 9676c21e..ff9672f5 100644 --- a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ru/multichan/YaoiChanParser.kt +++ b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ru/multichan/YaoiChanParser.kt @@ -13,6 +13,7 @@ import org.koitharu.kotatsu.parsers.util.* internal class YaoiChanParser(context: MangaLoaderContext) : ChanParser(context, MangaSource.YAOICHAN) { override val configKeyDomain = ConfigKey.Domain( + "v3.yaoi-chan.me", "v2.yaoi-chan.me", "v1.yaoi-chan.me", "yaoi-chan.me",