Minor daily update
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package org.koitharu.kotatsu.parsers.site.madara.id
|
||||
|
||||
import okhttp3.Headers
|
||||
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
||||
import org.koitharu.kotatsu.parsers.MangaSourceParser
|
||||
import org.koitharu.kotatsu.parsers.model.MangaSource
|
||||
import org.koitharu.kotatsu.parsers.site.madara.MadaraParser
|
||||
import java.util.Locale
|
||||
import kotlin.random.Random
|
||||
|
||||
@MangaSourceParser("MGKOMIK", "MgKomik", "id")
|
||||
internal class Mgkomik(context: MangaLoaderContext) :
|
||||
@@ -14,4 +16,23 @@ internal class Mgkomik(context: MangaLoaderContext) :
|
||||
override val datePattern = "dd MMM yy"
|
||||
override val stylePage = ""
|
||||
override val sourceLocale: Locale = Locale.ENGLISH
|
||||
private val randomLength = Random.Default.nextInt(13, 21)
|
||||
private val randomString = generateRandomString(randomLength)
|
||||
override val headers: Headers = Headers.Builder()
|
||||
.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("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", randomString)
|
||||
.build()
|
||||
|
||||
private fun generateRandomString(length: Int): String {
|
||||
val charset = "HALOGaES.BCDFHIJKMNPQRTUVWXYZ.bcdefghijklmnopqrstuvwxyz0123456789"
|
||||
return (1..length)
|
||||
.map { charset.random() }
|
||||
.joinToString("")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import java.util.*
|
||||
|
||||
@MangaSourceParser("MANGAYARO", "MangaYaro", "id")
|
||||
internal class Mangayaro(context: MangaLoaderContext) :
|
||||
MangaReaderParser(context, MangaSource.MANGAYARO, "www.mangayaro.net", pageSize = 20, searchPageSize = 20) {
|
||||
override val datePattern = "MMM d, yyyy"
|
||||
MangaReaderParser(context, MangaSource.MANGAYARO, "www.mangayaro.id", pageSize = 20, searchPageSize = 20) {
|
||||
override val sourceLocale: Locale = Locale.ENGLISH
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ class YaoiFlix(context: MangaLoaderContext) : PagedMangaParser(context, MangaSou
|
||||
|
||||
override val sortOrders: Set<SortOrder> = EnumSet.of(SortOrder.UPDATED)
|
||||
|
||||
override val configKeyDomain = ConfigKey.Domain("www.yaoiflix.cc")
|
||||
override val configKeyDomain = ConfigKey.Domain("www.yaoiflix.pro")
|
||||
|
||||
override suspend fun getListPage(
|
||||
page: Int,
|
||||
@@ -108,7 +108,7 @@ class YaoiFlix(context: MangaLoaderContext) : PagedMangaParser(context, MangaSou
|
||||
val href = a.attrAsRelativeUrl("href")
|
||||
MangaChapter(
|
||||
id = generateUid(href),
|
||||
name = div.selectFirstOrThrow(".episodetitle").text(),
|
||||
name = div.selectFirstOrThrow(".name").text(),
|
||||
number = i + 1,
|
||||
url = href,
|
||||
scanlator = null,
|
||||
|
||||
Reference in New Issue
Block a user