Hentai2Read - fix additional search pages (#2933)

This commit is contained in:
Mike 2020-04-29 18:01:16 -04:00 committed by GitHub
parent 044bd2c096
commit b5cfb58ead
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: Hentai2Read'
pkgNameSuffix = 'en.hentai2read'
extClass = '.Hentai2Read'
extVersionCode = 8
extVersionCode = 9
libVersion = '1.2'
}

View File

@ -45,7 +45,7 @@ class Hentai2Read : ParsedHttpSource() {
Pattern.compile("""about (\d+\s+\w+\s+ago)""")
}
lateinit var base64String: String
lateinit var nextSearchPage: String
}
override fun popularMangaSelector() = "div.book-grid-item"
@ -117,7 +117,7 @@ class Hentai2Read : ParsedHttpSource() {
}
Pair(POST(searchUrl, headers, form.build()), sortOrder)
} else {
Pair(GET("$searchUrl/$base64String", headers), sortOrder)
Pair(GET(nextSearchPage, headers), sortOrder)
}
}
@ -135,7 +135,7 @@ class Hentai2Read : ParsedHttpSource() {
}
val hasNextPage = document.select(searchMangaNextPageSelector()).firstOrNull()?.let {
base64String = it.attr("href").substringAfter("/advanced-search/").substringBefore("/")
nextSearchPage = it.attr("abs:href")
true
} ?: false