YugenMangas: Update domain (#9477)

* Update domain

* Fix
This commit is contained in:
Chopper 2025-07-02 05:10:20 -03:00 committed by Draff
parent b860b15286
commit 0284d48333
Signed by: Draff
GPG Key ID: E8A89F3211677653
2 changed files with 10 additions and 4 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'Yugen Mangás'
extClass = '.YugenMangas'
extVersionCode = 46
extVersionCode = 47
}
apply from: "$rootDir/common.gradle"

View File

@ -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"