parent
b5a49071b7
commit
7fd04cd006
9
src/es/sapphirescan/build.gradle
Normal file
9
src/es/sapphirescan/build.gradle
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
ext {
|
||||||
|
extName = 'SapphireScan'
|
||||||
|
extClass = '.SapphireScan'
|
||||||
|
themePkg = 'madara'
|
||||||
|
baseUrl = 'https://sapphirescan.com'
|
||||||
|
overrideVersionCode = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
apply from: "$rootDir/common.gradle"
|
BIN
src/es/sapphirescan/res/mipmap-hdpi/ic_launcher.png
Normal file
BIN
src/es/sapphirescan/res/mipmap-hdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
BIN
src/es/sapphirescan/res/mipmap-mdpi/ic_launcher.png
Normal file
BIN
src/es/sapphirescan/res/mipmap-mdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
BIN
src/es/sapphirescan/res/mipmap-xhdpi/ic_launcher.png
Normal file
BIN
src/es/sapphirescan/res/mipmap-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.0 KiB |
BIN
src/es/sapphirescan/res/mipmap-xxhdpi/ic_launcher.png
Normal file
BIN
src/es/sapphirescan/res/mipmap-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
src/es/sapphirescan/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
BIN
src/es/sapphirescan/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
@ -0,0 +1,45 @@
|
|||||||
|
package eu.kanade.tachiyomi.extension.es.sapphirescan
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||||
|
import eu.kanade.tachiyomi.network.interceptor.rateLimitHost
|
||||||
|
import eu.kanade.tachiyomi.source.model.Page
|
||||||
|
import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
|
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||||
|
import org.jsoup.nodes.Document
|
||||||
|
import org.jsoup.nodes.Element
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
|
class SapphireScan : Madara(
|
||||||
|
"SapphireScan",
|
||||||
|
"https://sapphirescan.com",
|
||||||
|
"es",
|
||||||
|
SimpleDateFormat("MMMM dd, yyyy", Locale("es")),
|
||||||
|
) {
|
||||||
|
override val client = super.client.newBuilder()
|
||||||
|
.rateLimitHost(baseUrl.toHttpUrl(), 3)
|
||||||
|
.build()
|
||||||
|
|
||||||
|
override val useNewChapterEndpoint = true
|
||||||
|
override val useLoadMoreRequest = LoadMoreStrategy.Always
|
||||||
|
|
||||||
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
|
return super.chapterFromElement(element).apply {
|
||||||
|
if (element.select("span.required-login").isNotEmpty()) {
|
||||||
|
name = "🔒 $name"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
|
val pageList = super.pageListParse(document)
|
||||||
|
|
||||||
|
if (
|
||||||
|
pageList.isEmpty() &&
|
||||||
|
document.select(".content-blocked, .login-required").isNotEmpty()
|
||||||
|
) {
|
||||||
|
throw Exception("Inicie sesión en WebView para ver este capítulo")
|
||||||
|
}
|
||||||
|
return pageList
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user