diff --git a/src/all/photos18/build.gradle b/src/all/photos18/build.gradle index d66e10bf9..0ad01c8e4 100644 --- a/src/all/photos18/build.gradle +++ b/src/all/photos18/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'Photos18' pkgNameSuffix = 'all.photos18' extClass = '.Photos18' - extVersionCode = 1 + extVersionCode = 2 isNsfw = true } diff --git a/src/all/photos18/src/eu/kanade/tachiyomi/extension/all/photos18/Photos18.kt b/src/all/photos18/src/eu/kanade/tachiyomi/extension/all/photos18/Photos18.kt index 5319390bf..0406f13c5 100644 --- a/src/all/photos18/src/eu/kanade/tachiyomi/extension/all/photos18/Photos18.kt +++ b/src/all/photos18/src/eu/kanade/tachiyomi/extension/all/photos18/Photos18.kt @@ -13,6 +13,7 @@ import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.online.HttpSource import eu.kanade.tachiyomi.util.asJsoup +import okhttp3.Headers import okhttp3.HttpUrl import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.Request @@ -35,6 +36,10 @@ class Photos18 : HttpSource(), ConfigurableSource { override val client = network.client.newBuilder().followRedirects(false).build() + override fun headersBuilder() = Headers.Builder().apply { + add("Referer", baseUrl) + } + override fun popularMangaRequest(page: Int) = GET("$baseUrlWithLang/sort/views?page=$page", headers) override fun popularMangaParse(response: Response): MangasPage {