Pufei - domain & imgdomain Update (#3587)

This commit is contained in:
ChsBuffer 2020-06-22 10:32:47 +08:00 committed by GitHub
parent 2b7d5095c1
commit dc9ddcdf49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: Pufei'
pkgNameSuffix = 'zh.pufei'
extClass = '.Pufei'
extVersionCode = 4
extVersionCode = 5
libVersion = '1.2'
}

View File

@ -13,6 +13,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 java.net.URL
import okhttp3.HttpUrl
import okhttp3.Interceptor
import okhttp3.MediaType
@ -48,10 +49,11 @@ fun ByteArray.toHexString() = joinToString("%") { "%02x".format(it) }
class Pufei : ParsedHttpSource() {
override val name = "扑飞漫画"
override val baseUrl = "http://m.ipufei.com"
override val baseUrl = "http://m.pufei8.com"
override val lang = "zh"
override val supportsLatest = true
val imageServer = "http://res.img.220012.net/" // Alternative: "http://res.img.ipufei.com/"
val imageServer = "http://res.img.youzipi.net/"
val thumbnailBaseUrl = "http://i.youzipi.net/"
override val client: OkHttpClient
get() = network.client.newBuilder()
@ -103,6 +105,8 @@ class Pufei : ParsedHttpSource() {
val manga = SManga.create()
manga.description = infoElement.select("div#bookIntro > p").text().trim()
manga.thumbnail_url = infoElement.select("div.thumb > img").first()?.attr("src")
val relativeThumnailURL = URL(infoElement.select("div.thumb > img").first()?.attr("src")).path
manga.thumbnail_url = "$thumbnailBaseUrl$relativeThumnailURL"
// manga.author = infoElement.select("dd").first()?.text()
return manga
}