parent
c380fe9093
commit
11da36eb70
Binary file not shown.
After Width: | Height: | Size: 5.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 7.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
Binary file not shown.
After Width: | Height: | Size: 131 KiB |
|
@ -0,0 +1,61 @@
|
|||
package eu.kanade.tachiyomi.extension.es.mangaland
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import eu.kanade.tachiyomi.network.POST
|
||||
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||
import okhttp3.FormBody
|
||||
import okhttp3.Request
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class Mangaland : Madara(
|
||||
"Mangaland",
|
||||
"https://mangaland.net",
|
||||
"es",
|
||||
SimpleDateFormat("MMMM dd, yyyy", Locale("es")),
|
||||
) {
|
||||
override val client = super.client.newBuilder()
|
||||
.rateLimit(2, 1, TimeUnit.SECONDS)
|
||||
.build()
|
||||
|
||||
override val useNewChapterEndpoint = true
|
||||
|
||||
override fun popularMangaNextPageSelector() = "body:not(:has(.no-posts))"
|
||||
|
||||
private fun loadMoreRequest(page: Int, metaKey: String): Request {
|
||||
val formBody = FormBody.Builder().apply {
|
||||
add("action", "madara_load_more")
|
||||
add("page", page.toString())
|
||||
add("template", "madara-core/content/content-archive")
|
||||
add("vars[paged]", "1")
|
||||
add("vars[orderby]", "meta_value_num")
|
||||
add("vars[template]", "archive")
|
||||
add("vars[sidebar]", "full")
|
||||
add("vars[meta_query][0][0][key]", "_wp_manga_chapter_type")
|
||||
add("vars[meta_query][0][0][value]", "manga")
|
||||
add("vars[meta_query][0][relation]", "AND")
|
||||
add("vars[meta_query][relation]", "AND")
|
||||
add("vars[post_type]", "wp-manga")
|
||||
add("vars[post_status]", "publish")
|
||||
add("vars[meta_key]", metaKey)
|
||||
add("vars[manga_archives_item_layout]", "big_thumbnail")
|
||||
}.build()
|
||||
|
||||
val xhrHeaders = headersBuilder()
|
||||
.add("Content-Length", formBody.contentLength().toString())
|
||||
.add("Content-Type", formBody.contentType().toString())
|
||||
.add("X-Requested-With", "XMLHttpRequest")
|
||||
.build()
|
||||
|
||||
return POST("$baseUrl/wp-admin/admin-ajax.php", xhrHeaders, formBody)
|
||||
}
|
||||
|
||||
override fun popularMangaRequest(page: Int): Request {
|
||||
return loadMoreRequest(page - 1, "_wp_manga_views")
|
||||
}
|
||||
|
||||
override fun latestUpdatesRequest(page: Int): Request {
|
||||
return loadMoreRequest(page - 1, "_latest_update")
|
||||
}
|
||||
}
|
|
@ -277,6 +277,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
|||
SingleLang("MangaKitsune", "https://mangakitsune.com", "en", isNsfw = true, overrideVersionCode = 4),
|
||||
SingleLang("MangaKL", "https://mangakala.com", "ja"),
|
||||
SingleLang("MangaKomi", "https://mangakomi.io", "en", overrideVersionCode = 5),
|
||||
SingleLang("Mangaland", "https://mangaland.net", "es", isNsfw = true),
|
||||
SingleLang("MangaLionz", "https://mangalionz.org", "ar", overrideVersionCode = 2),
|
||||
SingleLang("MangaManhua", "https://mangamanhua.online", "en", overrideVersionCode = 1),
|
||||
SingleLang("MangaManiacs", "https://mangamaniacs.org", "en", isNsfw = true),
|
||||
|
|
Loading…
Reference in New Issue