Initial commit
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
BIN
multisrc/overrides/madara/readmanhua/res/web_hi_res_512.png
Normal file
BIN
multisrc/overrides/madara/readmanhua/res/web_hi_res_512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 168 KiB |
36
multisrc/overrides/madara/readmanhua/src/ReadManhua.kt
Normal file
36
multisrc/overrides/madara/readmanhua/src/ReadManhua.kt
Normal file
@@ -0,0 +1,36 @@
|
||||
package eu.kanade.tachiyomi.extension.en.readmanhua
|
||||
|
||||
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 ReadManhua : Madara(
|
||||
"ReadManhua",
|
||||
"https://readmanhua.net",
|
||||
"en",
|
||||
dateFormat = SimpleDateFormat("dd MMM yyyy", Locale.US),
|
||||
) {
|
||||
|
||||
override fun chapterFromElement(element: Element): SChapter {
|
||||
val chapter = SChapter.create()
|
||||
val year = Calendar.getInstance().get(Calendar.YEAR).toLong()
|
||||
|
||||
with(element) {
|
||||
select(chapterUrlSelector).first()?.let { urlElement ->
|
||||
chapter.url = urlElement.attr("abs:href").let {
|
||||
it.substringBefore("?style=paged") + if (!it.endsWith(chapterUrlSuffix)) chapterUrlSuffix else ""
|
||||
}
|
||||
chapter.name = urlElement.text()
|
||||
}
|
||||
|
||||
// Dates can be part of a "new" graphic or plain text
|
||||
chapter.date_upload = select("img").firstOrNull()?.attr("alt")?.let { parseRelativeDate(it) }
|
||||
?: parseChapterDate(select("span.chapter-release-date i").firstOrNull()?.text() + " " + year)
|
||||
}
|
||||
|
||||
return chapter
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user