MangaCatalog multisrc extension (#6399)

* Create Ww3Read.kt

* Added Ww3ReadGenerator.kt

* Added Overrieds and icon

* Added More Sources

https://ww1.readjujutsukaisen.com
https://ww1.readtowerofgod.com
https://ww2.readhxh.com
https://readsololeveling.org
https://ww3.readneverland.com

* Update Ww3ReadGenerator.kt

* Removed old Names

* Added files with new name

* Removed files with old name

* Added files with new name
This commit is contained in:
Johannes Joens 2021-04-05 08:34:03 +12:00 committed by GitHub
parent 649e4fb419
commit b2d8775f19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 368 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,46 @@
package eu.kanade.tachiyomi.extension.en.readattackontitanshingekinokyojinmanga
import eu.kanade.tachiyomi.multisrc.mangacatalog.MangaCatalog
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.util.asJsoup
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.Request
import rx.Observable
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
class ReadAttackOnTitanShingekiNoKyojinManga : MangaCatalog("Read Attack on Titan/Shingeki no Kyojin Manga", "https://ww7.readsnk.com", "en") {
override val sourceList = listOf(
Pair("Shingeki No Kyojin", "$baseUrl/manga/shingeki-no-kyojin/"),
Pair("Colored", "$baseUrl/manga/shingeki-no-kyojin-colored/"),
Pair("Before the Fall", "$baseUrl/manga/shingeki-no-kyojin-before-the-fall/"),
Pair("Lost Girls", "$baseUrl/manga/shingeki-no-kyojin-lost-girls/"),
Pair("No Regrets", "$baseUrl/manga/attack-on-titan-no-regrets/"),
Pair("Junior High", "$baseUrl/manga/attack-on-titan-junior-high/"),
Pair("Harsh Mistress", "$baseUrl/manga/attack-on-titan-harsh-mistress-of-the-city/"),
Pair("Anthology", "$baseUrl/manga/attack-on-titan-anthology/"),
Pair("Art Book", "$baseUrl/manga/attack-on-titan-exclusive-art-book/"),
Pair("Spoof", "$baseUrl/manga/spoof-on-titan/"),
Pair("Guidebook", "$baseUrl/manga/attack-on-titan-guidebook-inside-outside/"),
Pair("No Regrets Colored", "$baseUrl/manga/attack-on-titan-no-regrets-colored/"),
).sortedBy { it.first }.distinctBy { it.second }
override fun chapterListSelector(): String = "div.w-full > .bg-white > .flex"
override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply {
val name1 = element.select(".flex > a.text-gray-900").text()
val name2 = element.select(".flex > div.text-xs").text()
if (name2 == ""){
name = name1
} else {
name = "$name1 - $name2"
}
url = element.select(".ml-auto div.flex a").attr("abs:href")
date_upload = System.currentTimeMillis()
}
}

View File

@ -0,0 +1,19 @@
package eu.kanade.tachiyomi.extension.en.readbokunoheroacademiamyheroacademiamanga
import eu.kanade.tachiyomi.multisrc.mangacatalog.MangaCatalog
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.util.asJsoup
class ReadBokuNoHeroAcademiaMyHeroAcademiaManga : MangaCatalog("Read Boku no Hero Academia/My Hero Academia Manga", "https://ww6.readmha.com", "en") {
override val sourceList = listOf(
Pair("Boku no Hero Academia", "$baseUrl/manga/boku-no-hero-academia/"),
Pair("Vigilante", "$baseUrl/manga/vigilante-boku-no-hero-academia-illegals/"),
Pair("Team Up", "$baseUrl/manga/my-hero-academia-team-up-mission/"),
Pair("MHA Smash", "$baseUrl/manga/boku-no-hero-academia-smash/"),
Pair("MHA: School Brief", "$baseUrl/manga/my-hero-academia-school-briefs/"),
Pair("Rising", "$baseUrl/manga/deku-bakugo-rising/"),
Pair("Colored", "$baseUrl/manga/boku-no-hero-academia-colored/"),
Pair("Oumagadoki Zoo", "$baseUrl/manga/oumagadoki-zoo/"),
Pair("Sensei no Bulge", "$baseUrl/manga/sensei-no-bulge/")
).sortedBy { it.first }.distinctBy { it.second }
}

View File

@ -0,0 +1,14 @@
package eu.kanade.tachiyomi.extension.en.readhunterxhuntermangaonline
import eu.kanade.tachiyomi.multisrc.mangacatalog.MangaCatalog
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.util.asJsoup
class ReadHunterxHunterMangaOnline : MangaCatalog("Read Hunter x Hunter Manga Online", "https://ww2.readhxh.com", "en") {
override val sourceList = listOf(
Pair("Hunter x Hunter", "$baseUrl/manga/hunter-x-hunter/"),
Pair("Colored", "$baseUrl/manga/hunter-x-hunter-colored/"),
Pair("Level E", "$baseUrl/manga/level-e/"),
Pair("Yu Yu Hakusho", "$baseUrl/manga/yu-yu-hakusho/"),
).sortedBy { it.first }.distinctBy { it.second }
}

View File

@ -0,0 +1,16 @@
package eu.kanade.tachiyomi.extension.en.readjujutsukaisenmangaonline
import eu.kanade.tachiyomi.multisrc.mangacatalog.MangaCatalog
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.util.asJsoup
class ReadJujutsuKaisenMangaOnline : MangaCatalog("Read Jujutsu Kaisen Manga Online", "https://ww1.readjujutsukaisen.com", "en") {
override val sourceList = listOf(
Pair("Jujutsu Kaisen", "$baseUrl/manga/jujutsu-kaisen/"),
Pair("Jujutsu Kaisen 0", "$baseUrl/manga/jujutsu-kaisen-0/"),
Pair("JJK Light Novel", "$baseUrl/manga/jujutsu-kaisen-first-light-novel/"),
Pair("No.9", "$baseUrl/manga/no-9/"),
Pair("JJK Colored", "$baseUrl/manga/jujutsu-kaisen-colored/"),
Pair("Fanbook", "$baseUrl/manga/jujutsu-kaisen-official-fanbook/"),
).sortedBy { it.first }.distinctBy { it.second }
}

View File

@ -0,0 +1,18 @@
package eu.kanade.tachiyomi.extension.en.readkaguyasamamangaonline
import eu.kanade.tachiyomi.multisrc.mangacatalog.MangaCatalog
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.util.asJsoup
class ReadKaguyaSamaMangaOnline : MangaCatalog("Read Kaguya-sama Manga Online", "https://ww1.readkaguyasama.com", "en") {
override val sourceList = listOf(
Pair("Kaguya-sama: Love is War", "$baseUrl/manga/kaguya-sama-love-is-war/"),
Pair("Official Doujin", "$baseUrl/manga/kaguya-wants-to-be-confessed-to-official-doujin/"),
Pair("Spin off", "$baseUrl/manga/we-want-to-talk-about-kaguya/"),
Pair("Light Novel", "$baseUrl/manga/kaguya-sama-light-novel/"),
Pair("Instant Bullet", "$baseUrl/manga/ib-instant-bullet/"),
Pair("Oshi no Ko", "$baseUrl/manga/oshi-no-ko/"),
Pair("Sayonara Piano Sonata", "$baseUrl/manga/sayonara-piano-sonata/"),
Pair("Original Hinatazaka", "$baseUrl/manga/original-hinatazaka/")
).sortedBy { it.first }.distinctBy { it.second }
}

View File

@ -0,0 +1,20 @@
package eu.kanade.tachiyomi.extension.en.readnanatsunotaizai7deadlysinsmangaonline
import eu.kanade.tachiyomi.multisrc.mangacatalog.MangaCatalog
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.util.asJsoup
class ReadNanatsuNoTaizai7DeadlySinsMangaOnline : MangaCatalog("Read Nanatsu no Taizai/7 Deadly Sins Manga Online", "https://ww3.read7deadlysins.com", "en") {
override val sourceList = listOf(
Pair("Mokushiroku no Yonkishi", "$baseUrl/manga/four-horsemen-of-the-apocalypse/"),
Pair("7DS: School", "$baseUrl/manga/mayoe-nanatsu-no-taizai-gakuen/"),
Pair("7DS:7 Days", "$baseUrl/manga/nanatsu-no-taizai-seven-days/"),
Pair("7DS:Vampires", "$baseUrl/manga/nanatsu-no-taizai-vampires-of-edinburgh/"),
Pair("Queen of Altar", "$baseUrl/manga/the-queen-of-the-altar/"),
Pair("7DS: 7 Colors", "$baseUrl/manga/nanatsu-no-taizai-nanairo-no-tsuioku/"),
Pair("7DS x FT", "$baseUrl/manga/fairy-tail-x-nanatsu-no-taizai-christmas-special/"),
Pair("7 Deadly Sins", "$baseUrl/manga/nanatsu-no-taizai/"),
Pair("7DS:7 Scars", "$baseUrl/manga/nanatsu-no-taizai-the-seven-scars-which-they-left-behind/"),
Pair("Kongou Banchou", "$baseUrl/manga/kongou-banchou/"),
).sortedBy { it.first }.distinctBy { it.second }
}

View File

@ -0,0 +1,38 @@
package eu.kanade.tachiyomi.extension.en.readonepunchmanmangaonlinetwo
import eu.kanade.tachiyomi.multisrc.mangacatalog.MangaCatalog
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.util.asJsoup
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.Request
import rx.Observable
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
class ReadOnePunchManMangaOnlineTwo : MangaCatalog("Read One-Punch Man Manga Online", "https://ww3.readopm.com", "en") {
override val sourceList = listOf(
Pair("One Punch Man", "$baseUrl/manga/one-punch-man/"),
Pair("Onepunch-Man (ONE)", "$baseUrl/manga/onepunch-man-one/"),
Pair("Colored", "$baseUrl/manga/one-punch-man-colored/"),
Pair("Mob Psycho 100", "$baseUrl/manga/mob-psycho-100/"),
Pair("Reigen", "$baseUrl/manga/reigen/"),
Pair("Eyeshield 21", "$baseUrl/manga/eyeshield-21/"),
).sortedBy { it.first }.distinctBy { it.second }
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply {
description = document.select("div.card-body > p").text()
title = document.select("h2 > span").text().substringAfter("Manga: ").trim()
thumbnail_url = document.select(".card-img-right").attr("src")
}
override fun chapterListSelector(): String = "tbody > tr"
override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply {
name = element.select("td:first-child").text()
url = element.select("a").attr("abs:href")
date_upload = System.currentTimeMillis() //I have no idear how to parse Date stuff
}
}

View File

@ -0,0 +1,12 @@
package eu.kanade.tachiyomi.extension.en.readsololevelingmangamanhwaonline
import eu.kanade.tachiyomi.multisrc.mangacatalog.MangaCatalog
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.util.asJsoup
class ReadSoloLevelingMangaManhwaOnline : MangaCatalog("Read Solo Leveling Manga/Manhwa Online", "https://readsololeveling.org", "en") {
override val sourceList = listOf(
Pair("Solo Levelingr", "$baseUrl/manga/solo-leveling/"),
Pair("Light Novel", "$baseUrl/manga/solo-leveling-novel/"),
).sortedBy { it.first }.distinctBy { it.second }
}

View File

@ -0,0 +1,16 @@
package eu.kanade.tachiyomi.extension.en.readthepromisedneverlandmangaonline
import eu.kanade.tachiyomi.multisrc.mangacatalog.MangaCatalog
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.util.asJsoup
class ReadThePromisedNeverlandMangaOnline : MangaCatalog("Read The Promised Neverland Manga Online", "https://ww3.readneverland.com", "en") {
override val sourceList = listOf(
Pair("The Promised Neverland", "$baseUrl/manga/the-promised-neverland/"),
Pair("Parody", "$baseUrl/manga/the-parodied-jokeland/"),
Pair("Novels", "$baseUrl/manga/novels/"),
Pair("Poppy no Negai", "$baseUrl/manga/poppy-no-negai/"),
Pair("Author's One shot", "$baseUrl/manga/shinrei-shashinshi-kouno-saburou/"),
Pair("Ashley Goeth", "$baseUrl/manga/ashley-goeth-no-yukue/"),
).sortedBy { it.first }.distinctBy { it.second }
}

View File

@ -0,0 +1,17 @@
package eu.kanade.tachiyomi.extension.en.readtokyoghoulretokyoghoulmangaonline
import eu.kanade.tachiyomi.multisrc.mangacatalog.MangaCatalog
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.util.asJsoup
class ReadTokyoGhoulReTokyoGhoulMangaOnline : MangaCatalog("Read Tokyo Ghoul Re & Tokyo Ghoul Manga Online", "https://ww8.tokyoghoulre.com", "en") {
override val sourceList = listOf(
Pair("Tokyo Ghoul", "$baseUrl/manga/tokyo-ghoul/"),
Pair("Tokyo Ghoul:re", "$baseUrl/manga/tokyo-ghoulre/"),
Pair("TG Jack", "$baseUrl/manga/tokyo-ghoul-jack/"),
Pair("TGre Colored", "$baseUrl/manga/tokyo-ghoulre-colored/"),
Pair("Gorilla", "$baseUrl/manga/this-gorilla-will-die-in-1-day/"),
Pair("ArtBook", "$baseUrl/manga/tokyo-ghoul-zakki/"),
Pair("TG Light Novel", "$baseUrl/manga/tokyo-ghoul-re-light-novels/")
).sortedBy { it.first }.distinctBy { it.second }
}

View File

@ -0,0 +1,15 @@
package eu.kanade.tachiyomi.extension.en.readtowerofgodmanhwamangaonline
import eu.kanade.tachiyomi.multisrc.mangacatalog.MangaCatalog
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.util.asJsoup
class ReadTowerOfGodManhwaMangaOnline : MangaCatalog("Read Tower of God Manhwa/Manga Online", "https://ww1.readtowerofgod.com", "en") {
override val sourceList = listOf(
Pair("Season 1", "$baseUrl/manga/tower-of-god-season-1/"),
Pair("Season 2", "$baseUrl/manga/tower-of-god-season-2/"),
Pair("Season 3", "$baseUrl/manga/tower-of-god-season-3/"),
Pair("RAW", "$baseUrl/manga/tower-of-god-spoilers-raw/"),
Pair("SIU Blog Postd", "$baseUrl/manga/siu-blog-post-translation/"),
).sortedBy { it.first }.distinctBy { it.second }
}

View File

@ -0,0 +1,103 @@
package eu.kanade.tachiyomi.multisrc.mangacatalog
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.Request
import rx.Observable
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
// Based On the original manga maniac source
// MangaCatalog is a network of sites for single franshise sites
abstract class MangaCatalog(
override val name: String,
override val baseUrl: String,
override val lang: String
) : ParsedHttpSource() {
open val sourceList = listOf(
Pair("$name", "$baseUrl")
).sortedBy { it.first }.distinctBy { it.second }
// Info
override val supportsLatest: Boolean = false
// Popular
override fun fetchPopularManga(page: Int): Observable<MangasPage> {
return Observable.just(MangasPage(sourceList.map { popularMangaFromPair(it.first, it.second) }, false))
}
private fun popularMangaFromPair(name: String, sourceurl: String): SManga = SManga.create().apply {
title = name
url = sourceurl
}
override fun popularMangaRequest(page: Int): Request = throw Exception("Not used")
override fun popularMangaNextPageSelector(): String? = throw Exception("Not used")
override fun popularMangaSelector(): String = throw Exception("Not used")
override fun popularMangaFromElement(element: Element) = throw Exception("Not used")
// Latest
override fun latestUpdatesRequest(page: Int): Request = throw Exception("Not used")
override fun latestUpdatesNextPageSelector(): String? = throw Exception("Not used")
override fun latestUpdatesSelector(): String = throw Exception("Not used")
override fun latestUpdatesFromElement(element: Element): SManga = throw Exception("Not used")
// Search
override fun searchMangaRequest(page: Int, query: String, filters: FilterList) = throw Exception("No Search Function")
override fun searchMangaNextPageSelector() = throw Exception("Not used")
override fun searchMangaSelector() = throw Exception("Not used")
override fun searchMangaFromElement(element: Element) = throw Exception("Not used")
// Get Override
override fun mangaDetailsRequest(manga: SManga): Request {
return GET(manga.url, headers)
}
override fun chapterListRequest(manga: SManga): Request {
return GET(manga.url, headers)
}
override fun pageListRequest(chapter: SChapter): Request {
return GET(chapter.url, headers)
}
// Details
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply {
val info = document.select("div.bg-bg-secondary > div.px-6 > div.flex-col").text()
title = document.select("div.container > h1").text()
description = if ("Description" in info) info.substringAfter("Description").trim() else info
thumbnail_url = document.select("div.flex > img").attr("src")
}
// Chapters
override fun chapterListSelector(): String = "div.w-full > div.bg-bg-secondary > div.grid"
override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply {
val name1 = element.select(".col-span-3 > a").text()
val name2 = element.select(".text-xs:not(a)").text()
if (name2 == ""){
name = name1
} else {
name = "$name1 - $name2"
}
url = element.select(".col-span-3 > a").attr("abs:href")
date_upload = System.currentTimeMillis()
}
// Pages
override fun pageListParse(document: Document): List<Page> = mutableListOf<Page>().apply {
document.select(".text-center img,.img_container img").forEach { img ->
add(Page(size, "", img.attr("src")))
}
}
override fun imageUrlParse(document: Document): String = throw Exception("Not Used")
}

View File

@ -0,0 +1,34 @@
package eu.kanade.tachiyomi.multisrc.mangacatalog
import generator.ThemeSourceData.SingleLang
import generator.ThemeSourceGenerator
class MangaCatalogGenerator : ThemeSourceGenerator {
override val themePkg = "mangacatalog"
override val themeClass = "MangaCatalog"
override val baseVersionCode: Int = 1
override val sources = listOf(
SingleLang("Read Boku no Hero Academia/My Hero Academia Manga", "https://ww6.readmha.com", "en", className = "ReadBokuNoHeroAcademiaMyHeroAcademiaManga"),
SingleLang("Read One-Punch Man Manga Online", "https://ww3.readopm.com", "en", className = "ReadOnePunchManMangaOnlineTwo", pkgName = "readonepunchmanmangaonlinetwo"), //exact same name as the one in mangamainac extension
SingleLang("Read Tokyo Ghoul Re & Tokyo Ghoul Manga Online", "https://ww8.tokyoghoulre.com", "en", className = "ReadTokyoGhoulReTokyoGhoulMangaOnline"),
SingleLang("Read Nanatsu no Taizai/7 Deadly Sins Manga Online", "https://ww3.read7deadlysins.com", "en", className = "ReadNanatsuNoTaizai7DeadlySinsMangaOnline"),
SingleLang("Read Kaguya-sama Manga Online", "https://ww1.readkaguyasama.com", "en", className = "ReadKaguyaSamaMangaOnline"),
SingleLang("Read Jujutsu Kaisen Manga Online", "https://ww1.readjujutsukaisen.com", "en"),
SingleLang("Read Tower of God Manhwa/Manga Online", "https://ww1.readtowerofgod.com", "en", className = "ReadTowerOfGodManhwaMangaOnline"),
SingleLang("Read Hunter x Hunter Manga Online", "https://ww2.readhxh.com", "en"),
SingleLang("Read Solo Leveling Manga/Manhwa Online", "https://readsololeveling.org", "en", className = "ReadSoloLevelingMangaManhwaOnline"),
SingleLang("Read The Promised Neverland Manga Online", "https://ww3.readneverland.com", "en"),
SingleLang("Read Attack on Titan/Shingeki no Kyojin Manga", "https://ww7.readsnk.com", "en", className = "ReadAttackOnTitanShingekiNoKyojinManga")
)
companion object {
@JvmStatic
fun main(args: Array<String>) {
MangaCatalogGenerator().createAll()
}
}
}