fix tritiniascans (#5526)

This commit is contained in:
OncePunchedMan 2021-01-23 18:24:57 +00:00 committed by GitHub
parent b32647e702
commit 6774433790
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 16 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Madara (multiple sources)'
pkgNameSuffix = "all.madara"
extClass = '.MadaraFactory'
extVersionCode = 174
extVersionCode = 175
libVersion = '1.2'
containsNsfw = true
}

View File

@ -353,21 +353,7 @@ class MangaClash : Madara(
dateFormat = SimpleDateFormat("MM/dd/yy", Locale.US)
)
class TritiniaScans : Madara("TritiniaScans", "https://tritiniaman.ga", "en") {
// site is a bit broken
override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/manga/index_m_orderby=views.html", headers)
override fun popularMangaNextPageSelector(): String? = null
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/manga/index_m_orderby=latest.html", headers)
override fun latestUpdatesNextPageSelector(): String? = null
private val imageRegex = Regex(""""(http[^"]*)"""")
override fun pageListParse(document: Document): List<Page> {
val script = document.select("#chapter_preloaded_images").firstOrNull()?.data()
?: throw Exception("chapter_preloaded_images not found")
return imageRegex.findAll(script).asIterable().mapIndexed { i, mr ->
Page(i, "", mr.groupValues[1].replace("\\", ""))
}
}
}
class TritiniaScans : Madara("TritiniaScans", "https://tritinia.com", "en")
class CopyPasteScan : Madara("CopyPasteScan", "https://copypastescan.xyz", "es")