Iqiyi/Tencent/Dongman: set desktop UA, move to zh-Hans (#10266)

This commit is contained in:
stevenyomi 2025-08-24 09:57:47 +00:00 committed by Draff
parent c74fe07813
commit c796e33925
Signed by: Draff
GPG Key ID: E8A89F3211677653
6 changed files with 14 additions and 6 deletions

View File

@ -1,7 +1,7 @@
ext { ext {
extName = 'Dongman Manhua' extName = 'Dongman Manhua'
extClass = '.DongmanManhua' extClass = '.DongmanManhua'
extVersionCode = 5 extVersionCode = 6
isNsfw = false isNsfw = false
} }

View File

@ -19,7 +19,8 @@ import java.util.Locale
class DongmanManhua : HttpSource() { class DongmanManhua : HttpSource() {
override val name = "Dongman Manhua" override val name = "Dongman Manhua"
override val lang = "zh" override val lang get() = "zh-Hans"
override val id get() = 4222375517460530289
override val baseUrl = "https://www.dongmanmanhua.cn" override val baseUrl = "https://www.dongmanmanhua.cn"
override val supportsLatest = true override val supportsLatest = true

View File

@ -1,7 +1,7 @@
ext { ext {
extName = 'Iqiyi' extName = 'Iqiyi'
extClass = '.Iqiyi' extClass = '.Iqiyi'
extVersionCode = 2 extVersionCode = 3
} }
apply from: "$rootDir/common.gradle" apply from: "$rootDir/common.gradle"

View File

@ -20,11 +20,15 @@ import uy.kohesive.injekt.injectLazy
class Iqiyi : ParsedHttpSource() { class Iqiyi : ParsedHttpSource() {
override val name: String = "爱奇艺叭嗒" override val name: String = "爱奇艺叭嗒"
override val lang: String = "zh" override val lang get() = "zh-Hans"
override val id get() = 2198877009406729694
override val supportsLatest: Boolean = true override val supportsLatest: Boolean = true
override val baseUrl: String = "https://www.iqiyi.com/manhua" override val baseUrl: String = "https://www.iqiyi.com/manhua"
private val json: Json by injectLazy() private val json: Json by injectLazy()
override fun headersBuilder() = super.headersBuilder()
.set("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36")
// Popular // Popular
override fun popularMangaRequest(page: Int) = GET("$baseUrl/category/全部_-1_-1_9_$page/", headers) override fun popularMangaRequest(page: Int) = GET("$baseUrl/category/全部_-1_-1_9_$page/", headers)

View File

@ -1,7 +1,7 @@
ext { ext {
extName = 'Tencent Comics (ac.qq.com)' extName = 'Tencent Comics (ac.qq.com)'
extClass = '.TencentComics' extClass = '.TencentComics'
extVersionCode = 7 extVersionCode = 8
} }
apply from: "$rootDir/common.gradle" apply from: "$rootDir/common.gradle"

View File

@ -34,7 +34,7 @@ class TencentComics : ParsedHttpSource() {
private val desktopUrl = "https://ac.qq.com" private val desktopUrl = "https://ac.qq.com"
override val lang = "zh" override val lang = "zh-Hans"
override val supportsLatest = true override val supportsLatest = true
@ -44,6 +44,9 @@ class TencentComics : ParsedHttpSource() {
private val json: Json by injectLazy() private val json: Json by injectLazy()
override fun headersBuilder() = super.headersBuilder()
.set("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36")
override fun chapterListRequest(manga: SManga): Request { override fun chapterListRequest(manga: SManga): Request {
return GET("$desktopUrl/Comic/comicInfo/" + manga.url.substringAfter("/index/"), headers) return GET("$desktopUrl/Comic/comicInfo/" + manga.url.substringAfter("/index/"), headers)
} }