From 3300d4f01c3747e48be2150ef32572c072f5c96c Mon Sep 17 00:00:00 2001 From: scb261 <65343233+scb261@users.noreply.github.com> Date: Sun, 28 Feb 2021 18:20:18 +0200 Subject: [PATCH] Nekopost: new file server url (#6006) * Nekopost: new file server url * ext version --- src/th/nekopost/build.gradle | 2 +- .../kanade/tachiyomi/extension/th/nekopost/Nekopost.kt | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/th/nekopost/build.gradle b/src/th/nekopost/build.gradle index bc9316847..9388e8dfd 100644 --- a/src/th/nekopost/build.gradle +++ b/src/th/nekopost/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'Nekopost' pkgNameSuffix = 'th.nekopost' extClass = '.Nekopost' - extVersionCode = 3 + extVersionCode = 4 libVersion = '1.2' } diff --git a/src/th/nekopost/src/eu/kanade/tachiyomi/extension/th/nekopost/Nekopost.kt b/src/th/nekopost/src/eu/kanade/tachiyomi/extension/th/nekopost/Nekopost.kt index c08cad09b..ed60292c2 100644 --- a/src/th/nekopost/src/eu/kanade/tachiyomi/extension/th/nekopost/Nekopost.kt +++ b/src/th/nekopost/src/eu/kanade/tachiyomi/extension/th/nekopost/Nekopost.kt @@ -10,6 +10,8 @@ import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.online.ParsedHttpSource import eu.kanade.tachiyomi.util.asJsoup +import okhttp3.Headers +import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.Response import org.json.JSONArray @@ -26,10 +28,16 @@ class Nekopost : ParsedHttpSource() { override val baseUrl: String = "https://www.nekopost.net/manga/" private val mangaListUrl: String = "https://www.nekopost.net/project/ajax_load_update/m/" - private val baseFileUrl: String = "https://www.nekopost.net/file_server/" + private val baseFileUrl: String = "https://fs.nekopost.net/" private val legacyChapterDataUrl: String = "https://www.nekopost.net/reader/loadChapterContent/" private val searchUrl: String = "https://www.nekopost.net/search/" + override val client: OkHttpClient = network.cloudflareClient + + override fun headersBuilder(): Headers.Builder { + return super.headersBuilder().add("Referer", baseUrl) + } + override val lang: String = "th" override val name: String = "Nekopost"