57Manhua: update image host config (#13587)

This commit is contained in:
stevenyomi 2022-09-27 05:44:23 +08:00 committed by GitHub
parent d84eed451e
commit e7332150ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -13,6 +13,7 @@ import org.jsoup.nodes.Element
import org.jsoup.select.Evaluator
// Memo: the old implementation had a string preference with key "IMAGE_SERVER"
// Updating the domain to www.wuqimh.com causes some requests to return 404
class WuqiManga : SinMH("57漫画", "http://www.wuqimh.net") {
override val nextPageSelector = "span.pager > a:last-child" // in the last page it's a span
@ -53,7 +54,7 @@ class WuqiManga : SinMH("57漫画", "http://www.wuqimh.net") {
override val dateSelector = ".cont-list dt:contains(更新于) + dd"
override val imageHost: String by lazy {
client.newCall(GET("$baseUrl/templates/wuqi/default/scripts/configs.js", headers)).execute().let {
client.newCall(GET("$mobileUrl/templates_pc/default/scripts/configs.js", headers)).execute().let {
Regex("""\['(.+?)']""").find(it.body!!.string())!!.groupValues[1].run { "http://$this" }
}
}

View File

@ -26,7 +26,7 @@ class SinMHGenerator : ThemeSourceGenerator {
),
SingleLang(
name = "57Manhua", baseUrl = "http://www.wuqimh.net", lang = "zh",
className = "WuqiManga", sourceName = "57漫画", overrideVersionCode = 4
className = "WuqiManga", sourceName = "57漫画", overrideVersionCode = 5
),
)