From bfadf8211c35fbbe1956900a4b83341a2200c0e7 Mon Sep 17 00:00:00 2001 From: Arraiment <76941874+Arraiment@users.noreply.github.com> Date: Tue, 24 Aug 2021 22:55:54 +0800 Subject: [PATCH] Madara fixes (#8801) * Fix ManhwaNelo title parsing * Update Mangasushi chapter endpoint * Update Shooting Star Scans domain * Update MangaScantrad chapter endpoint * Update LeviatanScans chapter endpoint * Update MangaCultivator chapter endpoint --- .../leviatanscans/src/LeviatanScansFactory.kt | 8 ++++++-- .../mangacultivator/src/MangaCultivator.kt | 8 ++++++++ .../madara/mangascantrad/src/MangaScantrad.kt | 4 +++- .../madara/mangasushi/src/Mangasushi.kt | 8 ++++++++ .../madara/manhwanelo/src/ManhwaNelo.kt | 18 ++++++++++++++++++ .../multisrc/madara/MadaraGenerator.kt | 12 ++++++------ 6 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 multisrc/overrides/madara/mangacultivator/src/MangaCultivator.kt create mode 100644 multisrc/overrides/madara/mangasushi/src/Mangasushi.kt diff --git a/multisrc/overrides/madara/leviatanscans/src/LeviatanScansFactory.kt b/multisrc/overrides/madara/leviatanscans/src/LeviatanScansFactory.kt index 4bcf22761..765cac2ec 100644 --- a/multisrc/overrides/madara/leviatanscans/src/LeviatanScansFactory.kt +++ b/multisrc/overrides/madara/leviatanscans/src/LeviatanScansFactory.kt @@ -10,5 +10,9 @@ class LeviatanScansFactory : SourceFactory { LeviatanScansES(), ) } -class LeviatanScansEN : Madara("Leviatan Scans", "https://leviatanscans.com", "en") -class LeviatanScansES : Madara("Leviatan Scans", "https://es.leviatanscans.com", "es") +class LeviatanScansEN : Madara("Leviatan Scans", "https://leviatanscans.com", "en") { + override val useNewChapterEndpoint: Boolean = true +} +class LeviatanScansES : Madara("Leviatan Scans", "https://es.leviatanscans.com", "es") { + override val useNewChapterEndpoint: Boolean = true +} diff --git a/multisrc/overrides/madara/mangacultivator/src/MangaCultivator.kt b/multisrc/overrides/madara/mangacultivator/src/MangaCultivator.kt new file mode 100644 index 000000000..c16a8d4ce --- /dev/null +++ b/multisrc/overrides/madara/mangacultivator/src/MangaCultivator.kt @@ -0,0 +1,8 @@ +package eu.kanade.tachiyomi.extension.en.mangacultivator + +import eu.kanade.tachiyomi.multisrc.madara.Madara + + +class MangaCultivator : Madara("MangaCultivator", "https://mangacultivator.com", "en") { + override val useNewChapterEndpoint: Boolean = true +} \ No newline at end of file diff --git a/multisrc/overrides/madara/mangascantrad/src/MangaScantrad.kt b/multisrc/overrides/madara/mangascantrad/src/MangaScantrad.kt index b977b80bb..3d981e02b 100644 --- a/multisrc/overrides/madara/mangascantrad/src/MangaScantrad.kt +++ b/multisrc/overrides/madara/mangascantrad/src/MangaScantrad.kt @@ -4,4 +4,6 @@ import eu.kanade.tachiyomi.multisrc.madara.Madara import java.text.SimpleDateFormat import java.util.Locale -class MangaScantrad : Madara("Manga-Scantrad", "https://manga-scantrad.net", "fr", SimpleDateFormat("d MMM yyyy", Locale.FRANCE)) +class MangaScantrad : Madara("Manga-Scantrad", "https://manga-scantrad.net", "fr", SimpleDateFormat("d MMM yyyy", Locale.FRANCE)) { + override val useNewChapterEndpoint: Boolean = true +} diff --git a/multisrc/overrides/madara/mangasushi/src/Mangasushi.kt b/multisrc/overrides/madara/mangasushi/src/Mangasushi.kt new file mode 100644 index 000000000..11d6be2c6 --- /dev/null +++ b/multisrc/overrides/madara/mangasushi/src/Mangasushi.kt @@ -0,0 +1,8 @@ +package eu.kanade.tachiyomi.extension.en.mangasushi + +import eu.kanade.tachiyomi.multisrc.madara.Madara + + +class Mangasushi : Madara("Mangasushi", "https://mangasushi.net", "en") { + override val useNewChapterEndpoint: Boolean = true +} \ No newline at end of file diff --git a/multisrc/overrides/madara/manhwanelo/src/ManhwaNelo.kt b/multisrc/overrides/madara/manhwanelo/src/ManhwaNelo.kt index 79ea60713..52e6a702f 100644 --- a/multisrc/overrides/madara/manhwanelo/src/ManhwaNelo.kt +++ b/multisrc/overrides/madara/manhwanelo/src/ManhwaNelo.kt @@ -3,10 +3,28 @@ package eu.kanade.tachiyomi.extension.en.manhwanelo import eu.kanade.tachiyomi.multisrc.madara.Madara import eu.kanade.tachiyomi.source.model.SManga import org.jsoup.nodes.Document +import org.jsoup.nodes.Element import java.util.Locale class ManhwaNelo : Madara("ManhwaNelo", "https://manhwanelo.com", "en") { + override fun popularMangaFromElement(element: Element): SManga { + val manga = SManga.create() + + with(element) { + select("div.item-thumb a").first()?.let { + manga.setUrlWithoutDomain(it.attr("abs:href")) + manga.title = it.attr("title") + } + + select("img").first()?.let { + manga.thumbnail_url = imageFromElement(it) + } + } + + return manga + } + override fun mangaDetailsParse(document: Document): SManga { val manga = SManga.create() with(document) { diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt index f6ca66e7b..ba8ef3139 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt @@ -13,7 +13,7 @@ class MadaraGenerator : ThemeSourceGenerator { override val baseVersionCode: Int = 11 override val sources = listOf( - MultiLang("Leviatan Scans", "https://leviatanscans.com", listOf("en", "es"), className = "LeviatanScansFactory", overrideVersionCode = 6), + MultiLang("Leviatan Scans", "https://leviatanscans.com", listOf("en", "es"), className = "LeviatanScansFactory", overrideVersionCode = 7), MultiLang("MangaForFree.net", "https://mangaforfree.net", listOf("en", "ko", "all"), isNsfw = true, className = "MangaForFreeFactory", pkgName = "mangaforfree", overrideVersionCode = 1), MultiLang("Manhwa18.cc", "https://manhwa18.cc", listOf("en", "ko", "all"), isNsfw = true, className = "Manhwa18CcFactory", pkgName = "manhwa18cc"), SingleLang("1st Kiss Manga.love", "https://1stkissmanga.love", "en", className = "FirstKissMangaLove"), @@ -178,7 +178,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Manga Too", "https://mangatoo.com/", "en", overrideVersionCode = 1), SingleLang("Manga Weebs", "https://mangaweebs.in", "en", overrideVersionCode = 5), SingleLang("Manga-Online.co", "https://www.manga-online.co", "th", className = "MangaOnlineCo"), - SingleLang("Manga-Scantrad", "https://manga-scantrad.net", "fr", className = "MangaScantrad", overrideVersionCode = 1), + SingleLang("Manga-Scantrad", "https://manga-scantrad.net", "fr", className = "MangaScantrad", overrideVersionCode = 2), SingleLang("Manga18 Fx", "https://manga18fx.com", "en", overrideVersionCode = 1), SingleLang("Manga1st", "https://manga1st.com", "en", overrideVersionCode = 1), SingleLang("Manga1st.online", "https://manga1st.online", "en", className = "MangaFirstOnline", overrideVersionCode = 1), @@ -192,7 +192,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("MangaBoss", "https://mangaboss.org", "en"), SingleLang("MangaBox", "https://mangabox.org", "en"), SingleLang("MangaClash", "https://mangaclash.com", "en", overrideVersionCode = 3), - SingleLang("MangaCultivator", "https://mangacultivator.com", "en", overrideVersionCode = 1), + SingleLang("MangaCultivator", "https://mangacultivator.com", "en", overrideVersionCode = 2), SingleLang("MangaCV", "https://mangacv.com", "en", isNsfw = true), SingleLang("MangaDrago", "https://mangadrago.com", "en"), SingleLang("MangaDods", "https://www.mangadods.com", "en", overrideVersionCode = 2), @@ -240,7 +240,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Mangaka3rb", "https://mangaka3rb.com", "ar"), SingleLang("Mangakik", "https://mangakik.com", "en"), SingleLang("Mangas Origines", "https://mangas-origines.fr", "fr", true, overrideVersionCode = 1), - SingleLang("Mangasushi", "https://mangasushi.net", "en", overrideVersionCode = 1), + SingleLang("Mangasushi", "https://mangasushi.net", "en", overrideVersionCode = 2), SingleLang("Mangauptocats", "https://mangauptocats.online", "th", overrideVersionCode = 1), SingleLang("Mangazuki.me", "https://mangazuki.me", "en", className = "MangazukiMe", overrideVersionCode = 1), SingleLang("Mangceh", "https://mangceh.me", "id", isNsfw = true, overrideVersionCode = 2), @@ -270,7 +270,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Manhwa.biz", "https://manhwa.biz", "en", isNsfw = true, className = "Manhwabiz"), SingleLang("ManhwaBookShelf", "https://manhwabookshelf.com", "en"), SingleLang("Manhwafull", "https://manhwafull.com", "en"), - SingleLang("ManhwaNelo", "https://manhwanelo.com", "en", overrideVersionCode = 1), + SingleLang("ManhwaNelo", "https://manhwanelo.com", "en", overrideVersionCode = 2), SingleLang("ManhwaPool", "https://manhwapool.com", "en"), SingleLang("Manhwatop", "https://manhwatop.com", "en", overrideVersionCode = 1), SingleLang("Manhwahentai.me", "https://manhwahentai.me", "en", className = "ManhwahentaiMe", isNsfw = true, overrideVersionCode = 2), @@ -340,7 +340,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Setsu Scans", "https://setsuscans.com", "en", overrideVersionCode = 1), SingleLang("Shield Manga", "https://shieldmanga.club", "en", overrideVersionCode = 2), SingleLang("ShinobiScans", "https://shinobiscans.com", "it"), - SingleLang("Shooting Star Scans", "https://shootingstarscans.xyz", "en", overrideVersionCode = 1), + SingleLang("Shooting Star Scans", "https://shootingstarscans.com", "en", overrideVersionCode = 2), SingleLang("ShoujoHearts", "https://shoujohearts.com", "en", overrideVersionCode = 2), SingleLang("SiXiang Scans", "http://www.sixiangscans.com", "en", overrideVersionCode = 1), SingleLang("Sinensis", "https://sinensisscan.com", "pt-BR", overrideVersionCode = 1),