MG Komik: fix blocked by cloudflare (#18659)
- browse use default method but changing substring
This commit is contained in:
parent
8a49605cf2
commit
b5e30c3e35
|
@ -1,12 +1,9 @@
|
|||
package eu.kanade.tachiyomi.extension.id.mgkomik
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||
import okhttp3.CacheControl
|
||||
import okhttp3.Headers
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
@ -20,34 +17,22 @@ class MGKomik : Madara("MG Komik", "https://mgkomik.id", "id", SimpleDateFormat(
|
|||
override val chapterUrlSuffix = ""
|
||||
|
||||
override fun headersBuilder(): Headers.Builder = super.headersBuilder()
|
||||
.add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9")
|
||||
.add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8")
|
||||
.add("Accept-Language", "en-US,en;q=0.9,id;q=0.8")
|
||||
.add("DNT", "1")
|
||||
.add("Referer", "$baseUrl/")
|
||||
.add("Sec-Fetch-Dest", "document")
|
||||
.add("Sec-Fetch-Mode", "navigate")
|
||||
.add("Sec-Fetch-Site", "same-origin")
|
||||
.add("Sec-Fetch-User", "?1")
|
||||
.add("Upgrade-Insecure-Requests", "1")
|
||||
.add("X-Requested-With", "XMLHttpRequest")
|
||||
.add("X-Requested-With", someBrowserName.random())
|
||||
|
||||
private val someBrowserName = arrayOf(
|
||||
"org.mozilla.firefox",
|
||||
"com.apple.safari",
|
||||
"org.chromium.chrome",
|
||||
)
|
||||
|
||||
override val mangaSubString = "komik"
|
||||
|
||||
override fun searchMangaNextPageSelector() = "a.page.larger"
|
||||
|
||||
override fun popularMangaSelector() = searchMangaSelector()
|
||||
|
||||
override fun popularMangaRequest(page: Int): Request {
|
||||
return GET(
|
||||
url = "$baseUrl/${searchPage(page)}?op&s&post_type=wp-manga&m_orderby=views",
|
||||
headers = headers,
|
||||
cache = CacheControl.FORCE_NETWORK,
|
||||
)
|
||||
}
|
||||
|
||||
override fun latestUpdatesRequest(page: Int): Request {
|
||||
return GET(
|
||||
url = "$baseUrl/${searchPage(page)}?op&s&post_type=wp-manga&m_orderby=latest",
|
||||
headers = headers,
|
||||
cache = CacheControl.FORCE_NETWORK,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -357,7 +357,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
|||
SingleLang("ManyToon.me", "https://manytoon.me", "en", isNsfw = true, className = "ManyToonMe", overrideVersionCode = 4),
|
||||
SingleLang("ManyToon", "https://manytoon.com", "en", isNsfw = true, overrideVersionCode = 5),
|
||||
SingleLang("ManyToonClub", "https://manytoon.club", "ko", isNsfw = true, overrideVersionCode = 1),
|
||||
SingleLang("MG Komik", "https://mgkomik.id", "id", overrideVersionCode = 8),
|
||||
SingleLang("MG Komik", "https://mgkomik.id", "id", overrideVersionCode = 9),
|
||||
SingleLang("Midnight Mess Scans", "https://midnightmess.org", "en", isNsfw = true, overrideVersionCode = 6),
|
||||
SingleLang("MidnightManga", "http://midnightmanga.com", "es"),
|
||||
SingleLang("Milftoon", "https://milftoon.xxx", "en", isNsfw = true, overrideVersionCode = 2),
|
||||
|
|
Loading…
Reference in New Issue