Skip to content

Commit

Permalink
Serimanga: Fix latest and popular tabs (#6944)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr1ks authored Jan 3, 2025
1 parent f6f1705 commit aa8f8fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/tr/serimanga/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'SeriManga'
extClass = '.SeriManga'
extVersionCode = 5
extVersionCode = 6
}

apply from: "$rootDir/common.gradle"
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,31 @@ class SeriManga : ParsedHttpSource() {

override fun popularMangaRequest(page: Int): Request {
return if (page == 1) {
GET("$baseUrl/mangalar", headers)
GET("$baseUrl/mangalar?filtrele=goruntulenme&sirala=DESC", headers)
} 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 {
setUrlWithoutDomain(element.attr("href"))
title = element.select("span.mlb-name").text()
thumbnail_url = styleToUrl(element).removeSurrounding("'")
thumbnail_url = styleToUrl(element)
}

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 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 {
setUrlWithoutDomain(element.attr("href"))
title = element.attr("title")
title = element.attr("title").substringBefore(" Manga Oku")
thumbnail_url = styleToUrl(element)
}

Expand Down

0 comments on commit aa8f8fb

Please sign in to comment.