Initial commit
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
BIN
multisrc/overrides/madara/taurusfansub/res/web_hi_res_512.png
Normal file
BIN
multisrc/overrides/madara/taurusfansub/res/web_hi_res_512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 129 KiB |
60
multisrc/overrides/madara/taurusfansub/src/TaurusFansub.kt
Normal file
60
multisrc/overrides/madara/taurusfansub/src/TaurusFansub.kt
Normal file
@@ -0,0 +1,60 @@
|
||||
package eu.kanade.tachiyomi.extension.es.taurusfansub
|
||||
|
||||
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 TaurusFansub : Madara(
|
||||
"Taurus Fansub",
|
||||
"https://taurusmanga.com",
|
||||
"es",
|
||||
dateFormat = SimpleDateFormat("dd/MM/yyy", Locale.ROOT),
|
||||
) {
|
||||
override val client = super.client.newBuilder()
|
||||
.rateLimit(2, 1, TimeUnit.SECONDS)
|
||||
.build()
|
||||
|
||||
override val useNewChapterEndpoint = true
|
||||
|
||||
override fun popularMangaNextPageSelector() = "body:not(:has(.no-posts))"
|
||||
override val mangaDetailsSelectorDescription = "div.tab-summary > div.tab-content > div#tab-reducir > div.contenedor"
|
||||
|
||||
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]", "right")
|
||||
add("vars[post_type]", "wp-manga")
|
||||
add("vars[post_status]", "publish")
|
||||
add("vars[meta_key]", metaKey)
|
||||
add("vars[order]", "desc")
|
||||
add("vars[meta_query][relation]", "OR")
|
||||
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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user