Fix mangalib.me manga pages (#4425)

Fix mangalib.me manga pages
This commit is contained in:
Pavka 2020-09-22 15:12:41 +03:00 committed by GitHub
parent df84417403
commit 2d921b76be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'MangaLib' extName = 'MangaLib'
pkgNameSuffix = 'ru.libmanga' pkgNameSuffix = 'ru.libmanga'
extClass = '.LibManga' extClass = '.LibManga'
extVersionCode = 22 extVersionCode = 23
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -67,7 +67,7 @@ class LibManga : ConfigurableSource, HttpSource() {
private val servers = mapOf( private val servers = mapOf(
"secondary" to "https://img2.emanga.ru", "secondary" to "https://img2.emanga.ru",
"fourth" to "https://img4.imgslib.ru", "fourth" to "https://img4.imgslib.ru",
"compress" to "https://img3.ranobelib.me" "compress" to "https://img3.cdnlib.org",
) )
override fun setupPreferenceScreen(screen: androidx.preference.PreferenceScreen) { override fun setupPreferenceScreen(screen: androidx.preference.PreferenceScreen) {
@ -180,8 +180,9 @@ class LibManga : ConfigurableSource, HttpSource() {
private fun popularMangaFromElement(el: JsonElement) = SManga.create().apply { private fun popularMangaFromElement(el: JsonElement) = SManga.create().apply {
val slug = el["slug"].string val slug = el["slug"].string
val cover = el["cover"].string
title = el["name"].string title = el["name"].string
thumbnail_url = "$baseUrl/uploads/cover/$slug/cover/cover_250x350.jpg" thumbnail_url = "$baseUrl/uploads/cover/$slug/cover/${cover}_250x350.jpg"
url = "/$slug" url = "/$slug"
} }
@ -268,8 +269,9 @@ class LibManga : ConfigurableSource, HttpSource() {
.select("script:containsData(window.__info)") .select("script:containsData(window.__info)")
.first() .first()
.html() .html()
.split("window.__info = ")
.last()
.trim() .trim()
.removePrefix("window.__info = ")
.split(";") .split(";")
.first() .first()