NineMangaFr headers (#2771)

NineMangaFr headers
This commit is contained in:
Mike 2020-04-23 08:19:26 -04:00 committed by GitHub
parent 23f6b3c46b
commit 0075227433
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: NineManga'
pkgNameSuffix = "all.ninemanga"
extClass = '.NineMangaFactory'
extVersionCode = 8
extVersionCode = 9
libVersion = '1.2'
}

View File

@ -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)