From 00752274331794bd2b56125570142e8f7f9c689a Mon Sep 17 00:00:00 2001 From: Mike <51273546+SnakeDoc83@users.noreply.github.com> Date: Thu, 23 Apr 2020 08:19:26 -0400 Subject: [PATCH] NineMangaFr headers (#2771) NineMangaFr headers --- src/all/ninemanga/build.gradle | 2 +- .../tachiyomi/extension/all/ninemanga/NineMangaFactory.kt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/all/ninemanga/build.gradle b/src/all/ninemanga/build.gradle index effcb3619..c6765adc5 100644 --- a/src/all/ninemanga/build.gradle +++ b/src/all/ninemanga/build.gradle @@ -5,7 +5,7 @@ ext { appName = 'Tachiyomi: NineManga' pkgNameSuffix = "all.ninemanga" extClass = '.NineMangaFactory' - extVersionCode = 8 + extVersionCode = 9 libVersion = '1.2' } diff --git a/src/all/ninemanga/src/eu/kanade/tachiyomi/extension/all/ninemanga/NineMangaFactory.kt b/src/all/ninemanga/src/eu/kanade/tachiyomi/extension/all/ninemanga/NineMangaFactory.kt index a870ff947..de5f1f4c9 100644 --- a/src/all/ninemanga/src/eu/kanade/tachiyomi/extension/all/ninemanga/NineMangaFactory.kt +++ b/src/all/ninemanga/src/eu/kanade/tachiyomi/extension/all/ninemanga/NineMangaFactory.kt @@ -4,6 +4,7 @@ import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceFactory import eu.kanade.tachiyomi.source.model.FilterList import eu.kanade.tachiyomi.source.model.SManga +import okhttp3.Headers import okhttp3.Request import org.jsoup.nodes.Element import java.text.ParseException @@ -448,6 +449,10 @@ class NineMangaIt : NineManga("NineMangaIt", "http://it.ninemanga.com", "it") { } class NineMangaFr : NineManga("NineMangaFr", "http://fr.ninemanga.com", "fr") { + override fun headersBuilder(): Headers.Builder = Headers.Builder() + .add("Accept-Language", "es-ES,es;q=0.9,en;q=0.8,gl;q=0.7") + .add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; WOW64) Gecko/20100101 Firefox/75") + // ES, FR, RU don't return results for searches with an apostrophe override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { return super.searchMangaRequest(page, query.substringBefore("\'"), filters)