Serimanga: Fix latest and popular tabs (#6944)

This commit is contained in:
Dr1ks 2025-01-02 23:51:40 -08:00 committed by Draff
parent b1f2459ddc
commit 0a3cc9a886
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 8 additions and 8 deletions

View File

@ -1,7 +1,7 @@
ext { ext {
extName = 'SeriManga' extName = 'SeriManga'
extClass = '.SeriManga' extClass = '.SeriManga'
extVersionCode = 5 extVersionCode = 6
} }
apply from: "$rootDir/common.gradle" apply from: "$rootDir/common.gradle"

View File

@ -30,31 +30,31 @@ class SeriManga : ParsedHttpSource() {
override fun popularMangaRequest(page: Int): Request { override fun popularMangaRequest(page: Int): Request {
return if (page == 1) { return if (page == 1) {
GET("$baseUrl/mangalar", headers) GET("$baseUrl/mangalar?filtrele=goruntulenme&sirala=DESC", headers)
} else { } else {
GET("$baseUrl/mangalar?page=$page", headers) GET("$baseUrl/mangalar?filtrele=goruntulenme&sirala=DESC&page=$page", headers)
} }
} }
override fun popularMangaFromElement(element: Element) = SManga.create().apply { override fun popularMangaFromElement(element: Element) = SManga.create().apply {
setUrlWithoutDomain(element.attr("href")) setUrlWithoutDomain(element.attr("href"))
title = element.select("span.mlb-name").text() title = element.select("span.mlb-name").text()
thumbnail_url = styleToUrl(element).removeSurrounding("'") thumbnail_url = styleToUrl(element)
} }
private fun styleToUrl(element: Element): String { private fun styleToUrl(element: Element): String {
return element.attr("style").substringAfter("(").substringBefore(")") return element.attr("style").substringAfter("('").substringBefore("')")
} }
override fun popularMangaNextPageSelector() = "[rel=next]" override fun popularMangaNextPageSelector() = "[rel=next]"
override fun latestUpdatesSelector() = "a.sli2-img" override fun latestUpdatesSelector() = "a.mlist-bg"
override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/?a=a&page=$page", headers) override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/?page=$page", headers)
override fun latestUpdatesFromElement(element: Element) = SManga.create().apply { override fun latestUpdatesFromElement(element: Element) = SManga.create().apply {
setUrlWithoutDomain(element.attr("href")) setUrlWithoutDomain(element.attr("href"))
title = element.attr("title") title = element.attr("title").substringBefore(" Manga Oku")
thumbnail_url = styleToUrl(element) thumbnail_url = styleToUrl(element)
} }