Fix MangaHub.fr images not loading and remove dead source (#17951)

This commit is contained in:
KirinRaikage 2023-09-15 20:58:08 +02:00 committed by GitHub
parent ee9cd11fd0
commit 5a6027d59f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 3 deletions

View File

@ -1,7 +1,25 @@
package eu.kanade.tachiyomi.extension.fr.mangahubfr
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.source.model.Page
import org.jsoup.nodes.Document
import java.text.SimpleDateFormat
import java.util.Locale
class MangaHubFr : Madara("MangaHub.fr", "https://mangahub.fr", "fr", dateFormat = SimpleDateFormat("d MMMM yyyy", Locale.FRENCH))
class MangaHubFr : Madara("MangaHub.fr", "https://mangahub.fr", "fr", dateFormat = SimpleDateFormat("d MMMM yyyy", Locale.FRENCH)) {
// Only display chapters which don't have Premium
override fun chapterListSelector() = "li.wp-manga-chapter:not(.vip-permission)"
override val chapterUrlSuffix = ""
override fun pageListParse(document: Document): List<Page> {
countViews(document)
return document.select(pageListParseSelector)
.mapIndexed { index, element ->
// Had to add trim because of white space in source.
val imageUrl = element.select("img").attr("abs:src").trim()
Page(index, document.location(), imageUrl)
}
}
}

View File

@ -267,7 +267,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("MangaGG", "https://mangagg.com", "en", overrideVersionCode = 2),
SingleLang("MangaGo Yaoi", "https://mangagoyaoi.com", "en", isNsfw = true),
SingleLang("MangaGreat", "https://mangagreat.com", "en", overrideVersionCode = 4),
SingleLang("MangaHub.fr", "https://mangahub.fr", "fr", isNsfw = true, className = "MangaHubFr", pkgName = "mangahubfr", overrideVersionCode = 1),
SingleLang("MangaHub.fr", "https://mangahub.fr", "fr", isNsfw = true, className = "MangaHubFr", pkgName = "mangahubfr", overrideVersionCode = 2),
SingleLang("MangaHZ", "https://www.mangahz.com", "en", isNsfw = true, overrideVersionCode = 2),
SingleLang("MangaK2", "https://mangak2.com", "en", isNsfw = true),
SingleLang("Mangakakalot.io (unoriginal)", "https://mangakakalot.io", "en", isNsfw = true, className = "MangakakalotIo"),
@ -295,7 +295,6 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("MangaRosie", "https://mangarosie.in", "en", isNsfw = true),
SingleLang("MangaRuby.com", "https://mangaruby.com", "en", isNsfw = true, className = "MangaRubyCom"),
SingleLang("Mangaryu", "https://mangaryu.com", "en", isNsfw = true),
SingleLang("Mangas Origines X", "https://x.mangas-origines.fr", "fr", isNsfw = true),
SingleLang("Mangas Origines", "https://mangas-origines.xyz", "fr", isNsfw = true, overrideVersionCode = 4),
SingleLang("Mangas-Origines.fr", "https://mangas-origines.fr", "fr", className = "MangasOriginesFr"),
SingleLang("MangaSco", "https://manhwasco.net", "en", overrideVersionCode = 2),