Add manga1000 (#14589)

* Add manga1000.

* Remove unnecessary space.

Co-authored-by: TheKingTermux <50316075+TheKingTermux@users.noreply.github.com>
Co-authored-by: mao09 <71811256+mao09@users.noreply.github.com>
This commit is contained in:
mao2009 2022-12-20 02:24:52 +09:00 committed by GitHub
parent 474ed09cc9
commit 7e10b61cff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 41 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -0,0 +1,40 @@
package eu.kanade.tachiyomi.extension.ja.manga1000
import eu.kanade.tachiyomi.multisrc.fmreader.FMReader
import eu.kanade.tachiyomi.source.model.SChapter
import org.jsoup.nodes.Element
import java.util.Calendar
class Manga1000 : FMReader("Manga1000", "https://manga1000.top", "ja") {
override fun chapterFromElement(element: Element, mangaTitle: String): SChapter {
return SChapter.create().apply {
element.let {
setUrlWithoutDomain(it.attr("abs:href"))
name = it.attr("title")
}
date_upload = element.select(chapterTimeSelector)
.let { if (it.hasText()) parseChapterDate(it.text()) else 0 }
}
}
private fun parseChapterDate(date: String): Long {
val value = date.split(' ')[dateValueIndex].toInt()
val chapterDate = Calendar.getInstance().apply {
set(Calendar.SECOND, 0)
set(Calendar.MILLISECOND, 0)
}
when (date.split(' ')[dateWordIndex]) {
"mins", "minutes" -> chapterDate.add(Calendar.MINUTE, value * -1)
"hours" -> chapterDate.add(Calendar.HOUR_OF_DAY, value * -1)
"days" -> chapterDate.add(Calendar.DATE, value * -1)
"weeks" -> chapterDate.add(Calendar.DATE, value * 7 * -1)
"months" -> chapterDate.add(Calendar.MONTH, value * -1)
"years" -> chapterDate.add(Calendar.YEAR, value * -1)
else -> return 0
}
return chapterDate.timeInMillis
}
}

View File

@ -22,6 +22,7 @@ class FMReaderGenerator : ThemeSourceGenerator {
SingleLang("Manhwa18", "https://manhwa18.com", "en", isNsfw = true, overrideVersionCode = 2),
SingleLang("Say Truyen", "https://saytruyen.net", "vi", overrideVersionCode = 2),
SingleLang("WeLoveManga", "https://weloma.art", "ja", pkgName = "rawlh", overrideVersionCode = 4),
SingleLang("Manga1000", "https://manga1000.top", "ja"),
)
companion object {