[RU]GroupLe country code 18+ detect (#17219)

* [RU]GroupLe country code 18+ detect

* autoclean
This commit is contained in:
Eshlender 2023-07-22 18:47:00 +05:00 committed by GitHub
parent 682050e13e
commit da0e1213a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -201,7 +201,7 @@ abstract class GroupLe(
private fun chapterListParse(response: Response, manga: SManga): List<SChapter> {
val document = response.asJsoup()
if ((document.select(".expandable.hide-dn").isNotEmpty() || document.select("img.logo").first()?.attr("title")?.contains("Allhentai") == true) && document.select(".user-avatar").isNullOrEmpty()) {
if ((document.select(".expandable.hide-dn").isNotEmpty() && document.select(".user-avatar").isNullOrEmpty() && document.toString().contains("current_user_country_code = 'RU'")) || (document.select("img.logo").first()?.attr("title")?.contains("Allhentai") == true && document.select(".user-avatar").isNullOrEmpty())) {
throw Exception("Для просмотра контента необходима авторизация через WebView\uD83C\uDF0E")
}
return document.select(chapterListSelector()).map { chapterFromElement(it, manga) }

View File

@ -9,7 +9,7 @@ class GroupLeGenerator : ThemeSourceGenerator {
override val themeClass = "GroupLe"
override val baseVersionCode = 15
override val baseVersionCode = 16
override val sources = listOf(
SingleLang("ReadManga", "https://readmanga.live", "ru", overrideVersionCode = 46),