parent
b860b15286
commit
0284d48333
@ -1,7 +1,7 @@
|
||||
ext {
|
||||
extName = 'Yugen Mangás'
|
||||
extClass = '.YugenMangas'
|
||||
extVersionCode = 46
|
||||
extVersionCode = 47
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
@ -45,7 +45,7 @@ class YugenMangas : HttpSource(), ConfigurableSource {
|
||||
else -> preferences.getString(BASE_URL_PREF, defaultBaseUrl)!!
|
||||
}
|
||||
|
||||
private val defaultBaseUrl: String = "https://yugenmangasbr.nssec.xyz"
|
||||
private val defaultBaseUrl: String = "https://yugenmangasbr.deliciousdelight.online"
|
||||
|
||||
override val lang = "pt-BR"
|
||||
|
||||
@ -89,7 +89,7 @@ class YugenMangas : HttpSource(), ConfigurableSource {
|
||||
override fun popularMangaParse(response: Response): MangasPage {
|
||||
val document = response.asJsoup()
|
||||
val script = document.selectFirst("script:containsData(initialSeries)")?.data()
|
||||
?: throw Exception("Não foi possivel encontrar a lista de mangás/manhwas")
|
||||
?: throw Exception(warning)
|
||||
|
||||
val json = POPULAR_MANGA_REGEX.find(script)?.groups?.get(1)?.value
|
||||
?.replace(ESCAPE_QUOTATION_MARK_REGEX, "\"")
|
||||
@ -111,7 +111,7 @@ class YugenMangas : HttpSource(), ConfigurableSource {
|
||||
thumbnail_url = element.selectFirst("img")?.attrImageSet()
|
||||
setUrlWithoutDomain(element.absUrl("href").substringBeforeLast("/"))
|
||||
}
|
||||
}
|
||||
}.takeIf(List<SManga>::isNotEmpty) ?: throw Exception(warning)
|
||||
return MangasPage(mangas, document.selectFirst("a[aria-label='Próxima página']:not([aria-disabled='true'])") != null)
|
||||
}
|
||||
|
||||
@ -218,6 +218,12 @@ class YugenMangas : HttpSource(), ConfigurableSource {
|
||||
?.let { "$baseUrl$it" }
|
||||
}
|
||||
|
||||
private val warning = """
|
||||
Não foi possível localizar a lista de mangás/manhwas.
|
||||
Tente atualizar a URL acessando: Extensões > $name > Configurações.
|
||||
Isso talvez resolva o problema.
|
||||
""".trimIndent()
|
||||
|
||||
companion object {
|
||||
private const val BASE_URL_PREF = "overrideBaseUrl"
|
||||
private const val BASE_URL_PREF_TITLE = "Editar URL da fonte"
|
||||
|
Loading…
x
Reference in New Issue
Block a user