VyvyManga: fix pagination and chapter names (#13796)

* Fix pagination

* Fix chapter names

* changelog
This commit is contained in:
Vetle Ledaal 2022-10-10 18:22:44 +02:00 committed by GitHub
parent 4cb0f31777
commit 8924c4a6fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 4 deletions

View File

@ -0,0 +1,12 @@
# 1.3.2
### Fix
* Proper pagination
* Update chapter name selector
# 1.3.1
### Features
* First version

View File

@ -5,7 +5,7 @@ ext {
extName = 'VyvyManga'
pkgNameSuffix = 'en.vyvymanga'
extClass = '.VyvyManga'
extVersionCode = 1
extVersionCode = 2
}
apply from: "$rootDir/common.gradle"

View File

@ -28,7 +28,7 @@ class VyvyManga : ParsedHttpSource() {
// Popular
override fun popularMangaRequest(page: Int): Request =
GET("$baseUrl/search", headers)
GET("$baseUrl/search" + if (page != 1) "?page=$page" else "", headers)
override fun popularMangaSelector(): String =
searchMangaSelector()
@ -62,7 +62,7 @@ class VyvyManga : ParsedHttpSource() {
// Latest
override fun latestUpdatesRequest(page: Int): Request =
GET("$baseUrl/search?q=&completed=&sort=updated_at", headers)
GET("$baseUrl/search?sort=updated_at" + if (page != 1) "&page=$page" else "", headers)
override fun latestUpdatesSelector(): String =
searchMangaSelector()
@ -94,7 +94,7 @@ class VyvyManga : ParsedHttpSource() {
override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply {
url = element.absUrl("href")
name = element.ownText()
name = element.selectFirst("span").text()
date_upload = parseChapterDate(element.selectFirst("> p")?.text())
}