Add Utoon (#4086)
This commit is contained in:
parent
e5815aaf29
commit
4206c918bf
9
src/en/utoon/build.gradle
Normal file
9
src/en/utoon/build.gradle
Normal file
@ -0,0 +1,9 @@
|
||||
ext {
|
||||
extName = 'Utoon'
|
||||
extClass = '.Utoon'
|
||||
themePkg = 'madara'
|
||||
baseUrl = 'https://utoon.net'
|
||||
overrideVersionCode = 0
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
BIN
src/en/utoon/res/mipmap-hdpi/ic_launcher.png
Normal file
BIN
src/en/utoon/res/mipmap-hdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.6 KiB |
BIN
src/en/utoon/res/mipmap-mdpi/ic_launcher.png
Normal file
BIN
src/en/utoon/res/mipmap-mdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.6 KiB |
BIN
src/en/utoon/res/mipmap-xhdpi/ic_launcher.png
Normal file
BIN
src/en/utoon/res/mipmap-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
src/en/utoon/res/mipmap-xxhdpi/ic_launcher.png
Normal file
BIN
src/en/utoon/res/mipmap-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
BIN
src/en/utoon/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
BIN
src/en/utoon/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
@ -0,0 +1,29 @@
|
||||
package eu.kanade.tachiyomi.extension.en.utoon
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import org.jsoup.nodes.Element
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Calendar
|
||||
import java.util.Locale
|
||||
|
||||
class Utoon : Madara(
|
||||
"Utoon",
|
||||
"https://utoon.net",
|
||||
"en",
|
||||
SimpleDateFormat("dd MMM yyyy", Locale.US),
|
||||
) {
|
||||
override val useNewChapterEndpoint = true
|
||||
|
||||
override val useLoadMoreRequest = LoadMoreStrategy.Always
|
||||
|
||||
override val chapterUrlSelector = "div > a"
|
||||
|
||||
override fun chapterFromElement(element: Element): SChapter {
|
||||
return super.chapterFromElement(element).apply {
|
||||
val currentYear = Calendar.getInstance().get(Calendar.YEAR)
|
||||
date_upload = element.selectFirst("span a")?.attr("title")?.let { parseRelativeDate(it) }
|
||||
?: parseChapterDate("${element.selectFirst(chapterDateSelector())?.text()} $currentYear")
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user