Add Yubikiri (#2610)

* Add Yubikiri

* Bump Madara base version
This commit is contained in:
Vetle Ledaal 2024-04-28 03:26:47 +00:00 committed by Draff
parent 964adc3624
commit 071342ecbe
9 changed files with 41 additions and 2 deletions

View File

@ -2,7 +2,7 @@ plugins {
id("lib-multisrc")
}
baseVersionCode = 35
baseVersionCode = 36
dependencies {
api(project(":lib:cryptoaes"))

View File

@ -946,7 +946,11 @@ abstract class Madara(
val imageUrl = element.selectFirst("img")?.let { imageFromElement(it) }
Page(index, document.location(), imageUrl)
}
val chapterProtectorHtml = chapterProtector.html()
val chapterProtectorHtml = chapterProtector.attr("src")
.takeIf { it.startsWith("data:text/javascript;base64,") }
?.substringAfter("data:text/javascript;base64,")
?.let { Base64.decode(it, Base64.DEFAULT).toString(Charsets.UTF_8) }
?: chapterProtector.html()
val password = chapterProtectorHtml
.substringAfter("wpmangaprotectornonce='")
.substringBefore("';")

View File

@ -0,0 +1,10 @@
ext {
extName = 'Yubikiri'
extClass = '.Yubikiri'
themePkg = 'madara'
baseUrl = 'https://yubikiri.my.id'
overrideVersionCode = 0
isNsfw = false
}
apply from: "$rootDir/common.gradle"

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -0,0 +1,25 @@
package eu.kanade.tachiyomi.extension.id.yubikiri
import eu.kanade.tachiyomi.multisrc.madara.Madara
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.Locale
class Yubikiri : Madara(
"Yubikiri",
"https://yubikiri.my.id",
"id",
dateFormat = SimpleDateFormat("d MMMM", Locale("en")),
) {
override val mangaDetailsSelectorAuthor = ".manga-authors > a"
override val mangaDetailsSelectorDescription = ".manga-summary p"
override val mangaDetailsSelectorThumbnail = "head meta[property='og:image']" // Same as browse
override val useNewChapterEndpoint = true
override fun imageFromElement(element: Element): String? {
return super.imageFromElement(element)
?.takeIf { it.isNotEmpty() }
?: element.attr("content") // Thumbnail from <head>
}
}