WebNovel.com: fix pages issue (#6249)

This commit is contained in:
Riztard Lanthorn 2021-03-23 00:13:45 +07:00 committed by GitHub
parent 9a24033f2d
commit afe8ece417
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Webnovel.com'
pkgNameSuffix = 'en.webnovel'
extClass = '.Webnovel'
extVersionCode = 2
extVersionCode = 3
libVersion = '1.2'
}

View File

@ -7,6 +7,7 @@ import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.Headers
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
@ -30,6 +31,11 @@ class Webnovel : ParsedHttpSource() {
private val dateFormat: SimpleDateFormat = SimpleDateFormat("MMM dd,yyyy", Locale.US)
override fun headersBuilder() = Headers.Builder().apply {
add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0 ")
add("Referer", baseUrl)
}
// popular
override fun popularMangaRequest(page: Int) = GET("$baseUrl/category/0_comic_page$page", headers)