fix: mmscans theme change (#11724)
This commit is contained in:
parent
3102383317
commit
6b742f6726
|
@ -0,0 +1,61 @@
|
||||||
|
package eu.kanade.tachiyomi.extension.en.mmscans
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||||
|
import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
|
import org.jsoup.nodes.Element
|
||||||
|
|
||||||
|
class MMScans : Madara("MMScans", "https://mm-scans.org", "en") {
|
||||||
|
override val popularMangaUrlSelector = "div.item-summary a"
|
||||||
|
override fun chapterListSelector() = "li.chapter-li"
|
||||||
|
override fun searchMangaSelector() = "a"
|
||||||
|
|
||||||
|
override fun popularMangaFromElement(element: Element): SManga {
|
||||||
|
val manga = SManga.create()
|
||||||
|
|
||||||
|
with(element) {
|
||||||
|
select(popularMangaUrlSelector).first()?.let {
|
||||||
|
manga.setUrlWithoutDomain(it.attr("abs:href"))
|
||||||
|
manga.title = it.selectFirst("h3").ownText()
|
||||||
|
}
|
||||||
|
|
||||||
|
select("img").first()?.let {
|
||||||
|
manga.thumbnail_url = imageFromElement(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return manga
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
|
val chapter = SChapter.create()
|
||||||
|
|
||||||
|
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.selectFirst(".chapter-title-date p").text()
|
||||||
|
}
|
||||||
|
chapter.date_upload = parseChapterDate(select(chapterDateSelector()).firstOrNull()?.text())
|
||||||
|
}
|
||||||
|
|
||||||
|
return chapter
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun searchMangaFromElement(element: Element): SManga {
|
||||||
|
val manga = SManga.create()
|
||||||
|
|
||||||
|
with(element) {
|
||||||
|
manga.setUrlWithoutDomain(attr("abs:href"))
|
||||||
|
select("div.post-title h3").first()?.let {
|
||||||
|
manga.title = it.ownText()
|
||||||
|
}
|
||||||
|
select("img").first()?.let {
|
||||||
|
manga.thumbnail_url = imageFromElement(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return manga
|
||||||
|
}
|
||||||
|
}
|
|
@ -173,7 +173,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("Lumine Scans", "https://luminescans.xyz", "en", overrideVersionCode = 1),
|
SingleLang("Lumine Scans", "https://luminescans.xyz", "en", overrideVersionCode = 1),
|
||||||
SingleLang("MG Komik", "https://mgkomik.com", "id", overrideVersionCode = 2),
|
SingleLang("MG Komik", "https://mgkomik.com", "id", overrideVersionCode = 2),
|
||||||
SingleLang("MHentais", "https://mhentais.com", "pt-BR", isNsfw = true, overrideVersionCode = 1),
|
SingleLang("MHentais", "https://mhentais.com", "pt-BR", isNsfw = true, overrideVersionCode = 1),
|
||||||
SingleLang("MMScans", "https://mm-scans.org", "en", overrideVersionCode = 2),
|
SingleLang("MMScans", "https://mm-scans.org", "en", overrideVersionCode = 3),
|
||||||
SingleLang("MadaraDex", "https://madaradx.org", "en", isNsfw = true),
|
SingleLang("MadaraDex", "https://madaradx.org", "en", isNsfw = true),
|
||||||
SingleLang("Manga Action", "https://mangaaction.com", "en", overrideVersionCode = 2),
|
SingleLang("Manga Action", "https://mangaaction.com", "en", overrideVersionCode = 2),
|
||||||
SingleLang("Manga Bin", "https://mangabin.com", "en", overrideVersionCode = 1),
|
SingleLang("Manga Bin", "https://mangabin.com", "en", overrideVersionCode = 1),
|
||||||
|
|
Loading…
Reference in New Issue