[RU]GroupLe fix image load (#12150)

* [RU]GroupLe fix image load

* status update
This commit is contained in:
Ejan 2022-06-10 22:23:36 +05:00 committed by GitHub
parent 0121ced4ef
commit 97ca4d9544
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -148,7 +148,8 @@ abstract class GroupLe(
private fun parseStatus(element: String): Int = when {
element.contains("Запрещена публикация произведения по копирайту") || element.contains("ЗАПРЕЩЕНА К ПУБЛИКАЦИИ НА ТЕРРИТОРИИ РФ!") -> SManga.LICENSED
element.contains("<b>Перевод:</b> продолжается") -> SManga.ONGOING
element.contains("<b>Сингл</b>") || element.contains("<b>Перевод:</b> завер") -> SManga.COMPLETED
element.contains("<b>Сингл</b>") || element.contains("<b>Перевод:</b> завер") || element.contains("<b>Перевод:</b> переведено") -> SManga.COMPLETED
element.contains("<b>Перевод:</b> приостановлен") -> SManga.ON_HIATUS
else -> SManga.UNKNOWN
}
@ -247,7 +248,7 @@ abstract class GroupLe(
var i = 0
while (m.find()) {
val urlParts = m.group().replace("[\"\']+".toRegex(), "").split(',')
val url = if (urlParts[1].isEmpty() && urlParts[2].startsWith("/static/")) {
var url = if (urlParts[1].isEmpty() && urlParts[2].startsWith("/static/")) {
baseUrl + urlParts[2]
} else {
if (urlParts[1].endsWith("/manga/")) {
@ -256,6 +257,8 @@ abstract class GroupLe(
urlParts[1] + urlParts[0] + urlParts[2]
}
}
if (!url.contains("://"))
url = "https:$url"
pages.add(Page(i++, "", url))
}
return pages

View File

@ -9,7 +9,7 @@ class GroupLeGenerator: ThemeSourceGenerator {
override val themeClass = "GroupLe"
override val baseVersionCode: Int = 1
override val baseVersionCode: Int = 2
override val sources = listOf(
SingleLang("ReadManga", "https://readmanga.io", "ru", overrideVersionCode = 45),