new source: The Blank (#19162)

* The Blank

* remove duplicate referer in madara ajax chapter requests

* lint

* bump

* don't use load more request
This commit is contained in:
AwkwardPeak7 2023-12-07 18:10:03 +05:00 committed by GitHub
parent 523ebc56f2
commit 4e56e7bc69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 49 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

@ -0,0 +1,47 @@
package eu.kanade.tachiyomi.extension.en.theblank
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import eu.kanade.tachiyomi.source.model.MangasPage
import okhttp3.Response
import java.text.SimpleDateFormat
import java.util.Locale
class TheBlank : Madara(
"The Blank Scanlation",
"https://theblank.net",
"en",
dateFormat = SimpleDateFormat("dd/MM/yy", Locale.US),
) {
override val client = super.client.newBuilder()
.rateLimit(1)
.build()
override val useNewChapterEndpoint = true
override fun searchPage(page: Int): String {
return if (page > 1) {
"page/$page/"
} else {
""
}
}
override fun popularMangaParse(response: Response) =
super.popularMangaParse(response).fixNextPage()
override fun latestUpdatesParse(response: Response) =
super.latestUpdatesParse(response).fixNextPage()
override fun searchMangaParse(response: Response) =
super.searchMangaParse(response).fixNextPage()
private fun MangasPage.fixNextPage(): MangasPage {
return if (mangas.size < 12) {
MangasPage(mangas, false)
} else {
this
}
}
}

View File

@ -637,7 +637,6 @@ abstract class Madara(
val xhrHeaders = headersBuilder()
.add("Content-Length", form.contentLength().toString())
.add("Content-Type", form.contentType().toString())
.add("Referer", "$baseUrl/")
.add("X-Requested-With", "XMLHttpRequest")
.build()
@ -646,7 +645,6 @@ abstract class Madara(
protected open fun xhrChaptersRequest(mangaUrl: String): Request {
val xhrHeaders = headersBuilder()
.add("Referer", "$baseUrl/")
.add("X-Requested-With", "XMLHttpRequest")
.build()

View File

@ -10,7 +10,7 @@ class MadaraGenerator : ThemeSourceGenerator {
override val themeClass = "Madara"
override val baseVersionCode: Int = 31
override val baseVersionCode: Int = 32
override val sources = listOf(
MultiLang("Atlantis Scan", "https://atlantisscan.com", listOf("es", "pt-BR"), isNsfw = true),
@ -454,6 +454,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("Taurus Fansub", "https://taurusmanga.com", "es", overrideVersionCode = 1),
SingleLang("TeenManhua", "https://teenmanhua.com", "en", overrideVersionCode = 1),
SingleLang("The Beginning After The End", "https://www.thebeginningaftertheend.fr", "fr", overrideVersionCode = 1),
SingleLang("The Blank Scanlation", "https://theblank.net", "en", className = "TheBlank", isNsfw = true),
SingleLang("The Guild", "https://theguildscans.com", "en"),
SingleLang("Time Naight", "https://timenaight.com", "tr"),
SingleLang("Todaymic", "https://todaymic.com", "en", overrideVersionCode = 1),