LXManga: Add referer, fix not found error in getPages (#2220)

master
Hoàng Phi Hùng 7 months ago committed by GitHub
parent a3abc81dfc
commit 08d46988a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,5 +1,6 @@
package org.koitharu.kotatsu.parsers.site.vi package org.koitharu.kotatsu.parsers.site.vi
import okhttp3.Headers
import org.koitharu.kotatsu.parsers.MangaLoaderContext import org.koitharu.kotatsu.parsers.MangaLoaderContext
import org.koitharu.kotatsu.parsers.MangaSourceParser import org.koitharu.kotatsu.parsers.MangaSourceParser
import org.koitharu.kotatsu.parsers.config.ConfigKey import org.koitharu.kotatsu.parsers.config.ConfigKey
@ -14,6 +15,11 @@ internal class LxManga(context: MangaLoaderContext) : PagedMangaParser(context,
override val configKeyDomain = ConfigKey.Domain("lxmanga.my") override val configKeyDomain = ConfigKey.Domain("lxmanga.my")
override fun getRequestHeaders(): Headers = Headers.Builder()
.add("Referer", "https://$domain/")
.add("Origin", "https://$domain")
.build()
override fun onCreateConfig(keys: MutableCollection<ConfigKey<*>>) { override fun onCreateConfig(keys: MutableCollection<ConfigKey<*>>) {
super.onCreateConfig(keys) super.onCreateConfig(keys)
keys.add(userAgentKey) keys.add(userAgentKey)

Loading…
Cancel
Save