Madara fix n replace (#5308)
* add arabic for parsing date * make chapter new banner selector to value * fix atikrost chapter name and time issue * fix mangaArabTeam chapter time issue * replace mangaKitsu with mangaCrimson * fix astralLibrary reversed chapter order issue
This commit is contained in:
parent
612f1a16d0
commit
34ee25aa50
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'Madara (multiple sources)'
|
extName = 'Madara (multiple sources)'
|
||||||
pkgNameSuffix = "all.madara"
|
pkgNameSuffix = "all.madara"
|
||||||
extClass = '.MadaraFactory'
|
extClass = '.MadaraFactory'
|
||||||
extVersionCode = 163
|
extVersionCode = 164
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
containsNsfw = true
|
containsNsfw = true
|
||||||
}
|
}
|
||||||
|
|
|
@ -402,6 +402,8 @@ abstract class Madara(
|
||||||
|
|
||||||
open val chapterUrlSuffix = "?style=list"
|
open val chapterUrlSuffix = "?style=list"
|
||||||
|
|
||||||
|
open val chapterDatesNewSelector = "img"
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element): SChapter {
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
val chapter = SChapter.create()
|
val chapter = SChapter.create()
|
||||||
|
|
||||||
|
@ -414,7 +416,7 @@ abstract class Madara(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dates can be part of a "new" graphic or plain text
|
// Dates can be part of a "new" graphic or plain text
|
||||||
chapter.date_upload = select("img").firstOrNull()?.attr("alt")?.let { parseRelativeDate(it) }
|
chapter.date_upload = select(chapterDatesNewSelector).firstOrNull()?.attr("alt")?.let { parseRelativeDate(it) }
|
||||||
?: parseChapterDate(select("span.chapter-release-date i").firstOrNull()?.text())
|
?: parseChapterDate(select("span.chapter-release-date i").firstOrNull()?.text())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -484,9 +486,9 @@ abstract class Madara(
|
||||||
val cal = Calendar.getInstance()
|
val cal = Calendar.getInstance()
|
||||||
|
|
||||||
return when {
|
return when {
|
||||||
WordSet("hari", "gün", "jour", "día", "dia", "day").anyWordIn(date) -> cal.apply { add(Calendar.DAY_OF_MONTH, -number) }.timeInMillis
|
WordSet("يوم", "hari", "gün", "jour", "día", "dia", "day").anyWordIn(date) -> cal.apply { add(Calendar.DAY_OF_MONTH, -number) }.timeInMillis
|
||||||
WordSet("jam", "saat", "heure", "hora", "hour").anyWordIn(date) -> cal.apply { add(Calendar.HOUR, -number) }.timeInMillis
|
WordSet("ساعات", "jam", "saat", "heure", "hora", "hour").anyWordIn(date) -> cal.apply { add(Calendar.HOUR, -number) }.timeInMillis
|
||||||
WordSet("menit", "dakika", "min", "minute", "minuto").anyWordIn(date) -> cal.apply { add(Calendar.MINUTE, -number) }.timeInMillis
|
WordSet("دقيقة", "menit", "dakika", "min", "minute", "minuto").anyWordIn(date) -> cal.apply { add(Calendar.MINUTE, -number) }.timeInMillis
|
||||||
WordSet("detik", "segundo", "second").anyWordIn(date) -> cal.apply { add(Calendar.SECOND, -number) }.timeInMillis
|
WordSet("detik", "segundo", "second").anyWordIn(date) -> cal.apply { add(Calendar.SECOND, -number) }.timeInMillis
|
||||||
else -> 0
|
else -> 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,12 +101,12 @@ class MadaraFactory : SourceFactory {
|
||||||
MangaBaz(),
|
MangaBaz(),
|
||||||
MangaBob(),
|
MangaBob(),
|
||||||
MangaClash(),
|
MangaClash(),
|
||||||
|
MangaCrimson(),
|
||||||
MangaCultivator(),
|
MangaCultivator(),
|
||||||
MangaDods(),
|
MangaDods(),
|
||||||
MangaGecesi(),
|
MangaGecesi(),
|
||||||
MangaHentai(),
|
MangaHentai(),
|
||||||
MangaKiss(),
|
MangaKiss(),
|
||||||
MangaKitsu(),
|
|
||||||
MangaKomi(),
|
MangaKomi(),
|
||||||
MangaLandArabic(),
|
MangaLandArabic(),
|
||||||
Mangalek(),
|
Mangalek(),
|
||||||
|
@ -244,7 +244,10 @@ class SpookyScanlations : Madara("Spooky Scanlations", "https://spookyscanlation
|
||||||
|
|
||||||
class RandomTranslations : Madara("Random Translations", "https://randomtranslations.com", "en", SimpleDateFormat("dd/MM/yyyy", Locale.US))
|
class RandomTranslations : Madara("Random Translations", "https://randomtranslations.com", "en", SimpleDateFormat("dd/MM/yyyy", Locale.US))
|
||||||
|
|
||||||
class Atikrost : Madara("Atikrost", "https://atikrost.com", "tr", SimpleDateFormat("MMMM dd, yyyy", Locale("tr")))
|
class Atikrost : Madara("Atikrost", "https://atikrost.com", "tr", SimpleDateFormat("MMMM dd, yyyy", Locale("tr"))) {
|
||||||
|
override val chapterUrlSelector = "a:not(:has(img))"
|
||||||
|
override val chapterDatesNewSelector = "img:not(.thumb)"
|
||||||
|
}
|
||||||
|
|
||||||
class ManhuaFast : Madara("ManhuaFast", "https://manhuafast.com", "en") {
|
class ManhuaFast : Madara("ManhuaFast", "https://manhuafast.com", "en") {
|
||||||
override val pageListParseSelector = "li.blocks-gallery-item"
|
override val pageListParseSelector = "li.blocks-gallery-item"
|
||||||
|
@ -270,7 +273,7 @@ class Aloalivn : Madara("Aloalivn", "https://aloalivn.com", "en") {
|
||||||
|
|
||||||
class MangaSco : Madara("MangaSco", "https://mangasco.com", "en")
|
class MangaSco : Madara("MangaSco", "https://mangasco.com", "en")
|
||||||
|
|
||||||
class MangaKitsu : Madara("Manga Kitsu", "https://mangakitsu.com", "tr", SimpleDateFormat("dd MMMM yyyy", Locale("tr")))
|
class MangaCrimson : Madara("Manga Crimson", "https://mangacrimson.com", "tr", SimpleDateFormat("dd MMMM yyyy", Locale("tr")))
|
||||||
|
|
||||||
class PrimeManga : Madara("Prime Manga", "https://primemanga.com", "en")
|
class PrimeManga : Madara("Prime Manga", "https://primemanga.com", "en")
|
||||||
|
|
||||||
|
@ -787,7 +790,7 @@ class HunterFansub : Madara("Hunter Fansub", "https://hunterfansub.com", "es") {
|
||||||
|
|
||||||
class MangaArabOnline : Madara("Manga Arab Online مانجا عرب اون لاين", "https://mangaarabonline.com", "ar", SimpleDateFormat("MMM d, yyyy", Locale.forLanguageTag("ar")))
|
class MangaArabOnline : Madara("Manga Arab Online مانجا عرب اون لاين", "https://mangaarabonline.com", "ar", SimpleDateFormat("MMM d, yyyy", Locale.forLanguageTag("ar")))
|
||||||
|
|
||||||
class MangaArabTeam : Madara("مانجا عرب تيم Manga Arab Team", "https://mangaarabteam.com", "ar") {
|
class MangaArabTeam : Madara("مانجا عرب تيم Manga Arab Team", "https://mangaarabteam.com", "ar", SimpleDateFormat("dd MMM، yyyy", Locale.forLanguageTag("ar"))) {
|
||||||
override fun imageRequest(page: Page): Request {
|
override fun imageRequest(page: Page): Request {
|
||||||
return GET(page.imageUrl!!.replace("http:", "https:"))
|
return GET(page.imageUrl!!.replace("http:", "https:"))
|
||||||
}
|
}
|
||||||
|
@ -884,7 +887,6 @@ class GoldenManga : Madara("موقع لترجمة المانجا", "https://gold
|
||||||
class Mangalek : Madara("مانجا ليك", "https://mangalek.com", "ar", SimpleDateFormat("MMMM dd, yyyy", Locale("ar")))
|
class Mangalek : Madara("مانجا ليك", "https://mangalek.com", "ar", SimpleDateFormat("MMMM dd, yyyy", Locale("ar")))
|
||||||
|
|
||||||
class AstralLibrary : Madara("Astral Library", "https://www.astrallibrary.net", "en", SimpleDateFormat("d MMM", Locale.US)) {
|
class AstralLibrary : Madara("Astral Library", "https://www.astrallibrary.net", "en", SimpleDateFormat("d MMM", Locale.US)) {
|
||||||
override fun chapterListParse(response: Response): List<SChapter> = super.chapterListParse(response).reversed()
|
|
||||||
override fun popularMangaRequest(page: Int): Request {
|
override fun popularMangaRequest(page: Int): Request {
|
||||||
return GET("$baseUrl/manga-tag/manga/?m_orderby=views&page=$page", headers)
|
return GET("$baseUrl/manga-tag/manga/?m_orderby=views&page=$page", headers)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue