|
|
|
@ -16,7 +16,6 @@ internal class UzayManga(context: MangaLoaderContext) :
|
|
|
|
PagedMangaParser(context, MangaParserSource.UZAYMANGA, 25) {
|
|
|
|
PagedMangaParser(context, MangaParserSource.UZAYMANGA, 25) {
|
|
|
|
|
|
|
|
|
|
|
|
override val configKeyDomain = ConfigKey.Domain("uzaymanga.com")
|
|
|
|
override val configKeyDomain = ConfigKey.Domain("uzaymanga.com")
|
|
|
|
private val cdnSuffix = "cdn1.$domain"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun onCreateConfig(keys: MutableCollection<ConfigKey<*>>) {
|
|
|
|
override fun onCreateConfig(keys: MutableCollection<ConfigKey<*>>) {
|
|
|
|
super.onCreateConfig(keys)
|
|
|
|
super.onCreateConfig(keys)
|
|
|
|
@ -168,14 +167,20 @@ internal class UzayManga(context: MangaLoaderContext) :
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
override suspend fun getPages(chapter: MangaChapter): List<MangaPage> {
|
|
|
|
override suspend fun getPages(chapter: MangaChapter): List<MangaPage> {
|
|
|
|
val doc = webClient.httpGet(chapter.url.toAbsoluteUrl(domain)).parseHtml()
|
|
|
|
val fullUrl = chapter.url.toAbsoluteUrl(domain)
|
|
|
|
val pageRegex = Regex("\\\\\"path\\\\\":\\\\\"([^\"]+)\\\\\"")
|
|
|
|
val doc = webClient.httpGet(fullUrl).parseHtml()
|
|
|
|
val script = doc.select("script").find { it.html().contains(pageRegex) }?.html() ?: return emptyList()
|
|
|
|
|
|
|
|
|
|
|
|
// Yeni regex: JSON içindeki "path" değerlerini yakala
|
|
|
|
|
|
|
|
val pageRegex = Regex("""\\"path\\":\\"([^\\"]+)\\"""")
|
|
|
|
|
|
|
|
val script = doc.select("script").find { it.html().contains(pageRegex) }?.html()
|
|
|
|
|
|
|
|
?: return emptyList()
|
|
|
|
|
|
|
|
|
|
|
|
return pageRegex.findAll(script).mapNotNull { result ->
|
|
|
|
return pageRegex.findAll(script).mapNotNull { result ->
|
|
|
|
result.groups[1]?.value?.let { url ->
|
|
|
|
result.groups[1]?.value?.let { path ->
|
|
|
|
|
|
|
|
// Yeni CDN yapısına göre URL oluştur
|
|
|
|
MangaPage(
|
|
|
|
MangaPage(
|
|
|
|
id = generateUid(url),
|
|
|
|
id = generateUid(path),
|
|
|
|
url = "https://$cdnSuffix/upload/series/$url",
|
|
|
|
url = "https://manga2.efsaneler.can.re/series/$path",
|
|
|
|
preview = null,
|
|
|
|
preview = null,
|
|
|
|
source = source,
|
|
|
|
source = source,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ -202,4 +207,4 @@ internal class UzayManga(context: MangaLoaderContext) :
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|