diff --git a/lib-multisrc/grouple/build.gradle.kts b/lib-multisrc/grouple/build.gradle.kts index e20bfd6e4..79e1d69b6 100644 --- a/lib-multisrc/grouple/build.gradle.kts +++ b/lib-multisrc/grouple/build.gradle.kts @@ -2,4 +2,4 @@ plugins { id("lib-multisrc") } -baseVersionCode = 27 +baseVersionCode = 28 diff --git a/lib-multisrc/grouple/src/eu/kanade/tachiyomi/multisrc/grouple/GroupLe.kt b/lib-multisrc/grouple/src/eu/kanade/tachiyomi/multisrc/grouple/GroupLe.kt index 59ef60caa..167f38e2c 100644 --- a/lib-multisrc/grouple/src/eu/kanade/tachiyomi/multisrc/grouple/GroupLe.kt +++ b/lib-multisrc/grouple/src/eu/kanade/tachiyomi/multisrc/grouple/GroupLe.kt @@ -177,9 +177,11 @@ abstract class GroupLe( "div#tab-description .manga-description", ).text() manga.status = when { - document.html() - .contains("Запрещена публикация произведения по копирайту") || document.html() - .contains("ЗАПРЕЩЕНА К ПУБЛИКАЦИИ НА ТЕРРИТОРИИ РФ!") -> SManga.LICENSED + ( + document.html() + .contains("Запрещена публикация произведения по копирайту") || document.html() + .contains("ЗАПРЕЩЕНА К ПУБЛИКАЦИИ НА ТЕРРИТОРИИ РФ!") + ) && document.select("div.chapters").isEmpty() -> SManga.LICENSED infoElement.html().contains("Сингл") -> SManga.COMPLETED else -> when (infoElement.selectFirst("span.badge:contains(выпуск)")?.text()) { diff --git a/src/ru/mintmanga/build.gradle b/src/ru/mintmanga/build.gradle index 9e8b43494..7a3e1d612 100644 --- a/src/ru/mintmanga/build.gradle +++ b/src/ru/mintmanga/build.gradle @@ -2,7 +2,7 @@ ext { extName = 'MintManga' extClass = '.MintManga' themePkg = 'grouple' - baseUrl = 'https://1.mintmanga.com' + baseUrl = 'https://2.mintmanga.one' overrideVersionCode = 46 isNsfw = true } diff --git a/src/ru/mintmanga/src/eu/kanade/tachiyomi/extension/ru/mintmanga/MintManga.kt b/src/ru/mintmanga/src/eu/kanade/tachiyomi/extension/ru/mintmanga/MintManga.kt index 4eacc1d2b..a9172438a 100644 --- a/src/ru/mintmanga/src/eu/kanade/tachiyomi/extension/ru/mintmanga/MintManga.kt +++ b/src/ru/mintmanga/src/eu/kanade/tachiyomi/extension/ru/mintmanga/MintManga.kt @@ -8,10 +8,11 @@ import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.source.model.Filter import eu.kanade.tachiyomi.source.model.FilterList import okhttp3.Request +import org.jsoup.nodes.Document import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get -class MintManga : GroupLe("MintManga", "https://1.mintmanga.com", "ru") { +class MintManga : GroupLe("MintManga", "https://2.mintmanga.one", "ru") { override val id: Long = 6 @@ -20,6 +21,14 @@ class MintManga : GroupLe("MintManga", "https://1.mintmanga.com", "ru") { override val baseUrl by lazy { getPrefBaseUrl() } + override fun getChapterSearchParams(document: Document): String { + val scriptContent = document.selectFirst("script:containsData(user_hash)")?.data() + + val userHash = scriptContent?.let { USER_HASH_REGEX.find(it)?.groupValues?.get(1) } + + return userHash?.let { "?d=$it" } ?: "" + } + override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { val url = super.searchMangaRequest(page, query, filters).url.newBuilder() (if (filters.isEmpty()) getFilterList().reversed() else filters.reversed()).forEach { filter -> @@ -201,5 +210,6 @@ class MintManga : GroupLe("MintManga", "https://1.mintmanga.com", "ru") { private const val DOMAIN_PREF = "Домен" private const val DEFAULT_DOMAIN_PREF = "pref_default_domain" private const val DOMAIN_TITLE = "Домен" + private val USER_HASH_REGEX = "user_hash.+'(.+)'".toRegex() } }