Grouple: small fixes (#7693)
* Grouple: error on paid chapters * Grouple: rating fix * Grouple: bump * Grouple: review fix * Grouple: authorization check
This commit is contained in:
parent
6c1e55053c
commit
d34316685b
|
@ -2,4 +2,4 @@ plugins {
|
||||||
id("lib-multisrc")
|
id("lib-multisrc")
|
||||||
}
|
}
|
||||||
|
|
||||||
baseVersionCode = 29
|
baseVersionCode = 30
|
||||||
|
|
|
@ -129,7 +129,7 @@ abstract class GroupLe(
|
||||||
infoElement.select(".info-icon").attr("data-content").substringBeforeLast("/5</b><br/>")
|
infoElement.select(".info-icon").attr("data-content").substringBeforeLast("/5</b><br/>")
|
||||||
.substringAfterLast(": <b>").replace(",", ".").toFloat() * 2
|
.substringAfterLast(": <b>").replace(",", ".").toFloat() * 2
|
||||||
val ratingVotes =
|
val ratingVotes =
|
||||||
infoElement.select(".col-sm-7 .user-rating meta[itemprop=\"ratingCount\"]")
|
infoElement.select(".col-sm-6 .user-rating meta[itemprop=\"ratingCount\"]")
|
||||||
.attr("content")
|
.attr("content")
|
||||||
val ratingStar = when {
|
val ratingStar = when {
|
||||||
ratingValue > 9.5 -> "★★★★★"
|
ratingValue > 9.5 -> "★★★★★"
|
||||||
|
@ -218,7 +218,7 @@ abstract class GroupLe(
|
||||||
val document = response.asJsoup()
|
val document = response.asJsoup()
|
||||||
|
|
||||||
if (document.select(".user-avatar").isEmpty() &&
|
if (document.select(".user-avatar").isEmpty() &&
|
||||||
document.title().run { contains("AllHentai") || contains("MintManga") || contains("МинтМанга") }
|
document.title().run { contains("AllHentai") || contains("MintManga") || contains("МинтМанга") || contains("RuMix") }
|
||||||
) {
|
) {
|
||||||
throw Exception("Для просмотра контента необходима авторизация через WebView\uD83C\uDF0E")
|
throw Exception("Для просмотра контента необходима авторизация через WebView\uD83C\uDF0E")
|
||||||
}
|
}
|
||||||
|
@ -311,7 +311,7 @@ abstract class GroupLe(
|
||||||
val html = document.html()
|
val html = document.html()
|
||||||
|
|
||||||
if (document.select(".user-avatar").isEmpty() &&
|
if (document.select(".user-avatar").isEmpty() &&
|
||||||
document.title().run { contains("AllHentai") || contains("MintManga") || contains("МинтМанга") }
|
document.title().run { contains("AllHentai") || contains("MintManga") || contains("МинтМанга") || contains("RuMix") }
|
||||||
|
|
||||||
) {
|
) {
|
||||||
throw Exception("Для просмотра контента необходима авторизация через WebView\uD83C\uDF0E")
|
throw Exception("Для просмотра контента необходима авторизация через WebView\uD83C\uDF0E")
|
||||||
|
@ -324,6 +324,9 @@ abstract class GroupLe(
|
||||||
throw Exception("Не удалось загрузить главу. Url: ${response.request.url}")
|
throw Exception("Не удалось загрузить главу. Url: ${response.request.url}")
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
|
if (document.selectFirst("div.alert") != null || document.selectFirst("form.purchase-form") != null) {
|
||||||
|
throw Exception("Эта глава платная. Используйте сайт, чтобы купить и прочитать ее.")
|
||||||
|
}
|
||||||
throw Exception("Дизайн сайта обновлен, для дальнейшей работы необходимо обновление дополнения")
|
throw Exception("Дизайн сайта обновлен, для дальнейшей работы необходимо обновление дополнения")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue