Add header for manhuagui extension (#861)

* add `Accept-Language` header for manhuagui

* update extVersionCode
This commit is contained in:
xingyuan li 2024-02-01 00:33:42 +08:00 committed by GitHub
parent 0f7e8144af
commit dd95fe5fd0
2 changed files with 2 additions and 1 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'ManHuaGui'
extClass = '.Manhuagui'
extVersionCode = 18
extVersionCode = 19
}
apply from: "$rootDir/common.gradle"

View File

@ -252,6 +252,7 @@ class Manhuagui(
override fun headersBuilder(): Headers.Builder = super.headersBuilder()
.set("Referer", baseUrl)
.set("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36")
.set("Accept-Language", "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7")
override fun popularMangaFromElement(element: Element) = mangaFromElement(element)
override fun latestUpdatesFromElement(element: Element) = mangaFromElement(element)