Update user agent on kissmanga ¯\_(ツ)_/¯

This commit is contained in:
inorichi 2018-06-06 12:42:57 +02:00
parent b19a4d2977
commit 56927927c8
2 changed files with 7 additions and 0 deletions

View File

@ -206,6 +206,7 @@ dependencies {
implementation "com.github.inorichi.Conductor:conductor:be8b3c5" implementation "com.github.inorichi.Conductor:conductor:be8b3c5"
implementation ("com.bluelinelabs:conductor-support:2.1.5-SNAPSHOT") { implementation ("com.bluelinelabs:conductor-support:2.1.5-SNAPSHOT") {
exclude group: "com.bluelinelabs", module: "conductor" exclude group: "com.bluelinelabs", module: "conductor"
exclude group: "com.android.support"
} }
implementation 'com.github.inorichi:conductor-support-preference:27.0.2' implementation 'com.github.inorichi:conductor-support-preference:27.0.2'

View File

@ -6,6 +6,7 @@ import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.source.model.* import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.online.ParsedHttpSource import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.FormBody import okhttp3.FormBody
import okhttp3.Headers
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
import okhttp3.Request import okhttp3.Request
import okhttp3.Response import okhttp3.Response
@ -29,6 +30,11 @@ class Kissmanga : ParsedHttpSource() {
override val client: OkHttpClient = network.cloudflareClient override val client: OkHttpClient = network.cloudflareClient
override fun headersBuilder(): Headers.Builder {
return Headers.Builder()
.add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; WOW64) Gecko/20100101 Firefox/60")
}
override fun popularMangaSelector() = "table.listing tr:gt(1)" override fun popularMangaSelector() = "table.listing tr:gt(1)"
override fun latestUpdatesSelector() = "table.listing tr:gt(1)" override fun latestUpdatesSelector() = "table.listing tr:gt(1)"