Merge pull request #26 from KotatsuApp/master
[pull] master from KotatsuApp:master
commit
55b9b6aac4
@ -0,0 +1,11 @@
|
|||||||
|
package org.koitharu.kotatsu.parsers.site.madara.fr
|
||||||
|
|
||||||
|
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
||||||
|
import org.koitharu.kotatsu.parsers.MangaSourceParser
|
||||||
|
import org.koitharu.kotatsu.parsers.model.ContentType
|
||||||
|
import org.koitharu.kotatsu.parsers.model.MangaSource
|
||||||
|
import org.koitharu.kotatsu.parsers.site.madara.MadaraParser
|
||||||
|
|
||||||
|
@MangaSourceParser("HENTAIORIGINES", "HentaiOrigines", "fr", ContentType.HENTAI)
|
||||||
|
internal class HentaiOrigines(context: MangaLoaderContext) :
|
||||||
|
MadaraParser(context, MangaSource.HENTAIORIGINES, "hentai-origines.fr")
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package org.koitharu.kotatsu.parsers.site.madara.pt
|
||||||
|
|
||||||
|
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
||||||
|
import org.koitharu.kotatsu.parsers.MangaSourceParser
|
||||||
|
import org.koitharu.kotatsu.parsers.model.MangaSource
|
||||||
|
import org.koitharu.kotatsu.parsers.site.madara.MadaraParser
|
||||||
|
|
||||||
|
@MangaSourceParser("MAIDSECRET", "MaidSecret", "pt")
|
||||||
|
internal class MaidSecret(context: MangaLoaderContext) :
|
||||||
|
MadaraParser(context, MangaSource.MAIDSECRET, "maidsecret.com", 10) {
|
||||||
|
override val datePattern: String = "dd/MM/yyyy"
|
||||||
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
package org.koitharu.kotatsu.parsers.site.madara.pt
|
||||||
|
|
||||||
|
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
||||||
|
import org.koitharu.kotatsu.parsers.MangaSourceParser
|
||||||
|
import org.koitharu.kotatsu.parsers.model.ContentType
|
||||||
|
import org.koitharu.kotatsu.parsers.model.MangaSource
|
||||||
|
import org.koitharu.kotatsu.parsers.model.MangaTag
|
||||||
|
import org.koitharu.kotatsu.parsers.site.madara.MadaraParser
|
||||||
|
import org.koitharu.kotatsu.parsers.util.domain
|
||||||
|
import org.koitharu.kotatsu.parsers.util.mapNotNullToSet
|
||||||
|
import org.koitharu.kotatsu.parsers.util.parseHtml
|
||||||
|
import org.koitharu.kotatsu.parsers.util.toTitleCase
|
||||||
|
import java.util.HashSet
|
||||||
|
|
||||||
|
@MangaSourceParser("MRBENNE", "MrBenne", "pt", ContentType.HENTAI)
|
||||||
|
internal class MrBenne(context: MangaLoaderContext) :
|
||||||
|
MadaraParser(context, MangaSource.MRBENNE, "mrbenne.com", 10) {
|
||||||
|
override val datePattern: String = "dd/MM/yyyy"
|
||||||
|
|
||||||
|
override suspend fun getAvailableTags(): Set<MangaTag> {
|
||||||
|
val doc = webClient.httpGet("https://$domain/?s=&post_type=wp-manga").parseHtml()
|
||||||
|
val body = doc.body()
|
||||||
|
val root = body.selectFirst("div.form-group.checkbox-group")
|
||||||
|
val list = root?.select("div.checkbox").orEmpty()
|
||||||
|
val keySet = HashSet<String>(list.size)
|
||||||
|
return list.mapNotNullToSet { div ->
|
||||||
|
val input = div.selectFirst("input") ?: return@mapNotNullToSet null
|
||||||
|
val label = div.selectFirst("label") ?: return@mapNotNullToSet null
|
||||||
|
val tag = input.attr("value")
|
||||||
|
if (tag.isEmpty() || !keySet.add(tag)) {
|
||||||
|
return@mapNotNullToSet null
|
||||||
|
}
|
||||||
|
MangaTag(
|
||||||
|
key = tag,
|
||||||
|
title = label.ownText().ifEmpty {
|
||||||
|
tag
|
||||||
|
}.toTitleCase(sourceLocale),
|
||||||
|
source = source,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
package org.koitharu.kotatsu.parsers.site.madara.pt
|
||||||
|
|
||||||
|
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
||||||
|
import org.koitharu.kotatsu.parsers.MangaSourceParser
|
||||||
|
import org.koitharu.kotatsu.parsers.model.MangaSource
|
||||||
|
import org.koitharu.kotatsu.parsers.site.madara.MadaraParser
|
||||||
|
|
||||||
|
@MangaSourceParser("NORTEROSE", "Norterose", "pt")
|
||||||
|
internal class Norterose(context: MangaLoaderContext) :
|
||||||
|
MadaraParser(context, MangaSource.NORTEROSE, "norterose.com.br", 10) {
|
||||||
|
override val datePattern: String = "dd/MM/yyyy"
|
||||||
|
override val withoutAjax = true
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package org.koitharu.kotatsu.parsers.site.mangareader.id
|
||||||
|
|
||||||
|
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
||||||
|
import org.koitharu.kotatsu.parsers.MangaSourceParser
|
||||||
|
import org.koitharu.kotatsu.parsers.model.ContentType
|
||||||
|
import org.koitharu.kotatsu.parsers.model.MangaSource
|
||||||
|
import org.koitharu.kotatsu.parsers.site.mangareader.MangaReaderParser
|
||||||
|
|
||||||
|
@MangaSourceParser("MIHENTAI", "MiHentai", "id", ContentType.HENTAI)
|
||||||
|
internal class MiHentai(context: MangaLoaderContext) :
|
||||||
|
MangaReaderParser(context, MangaSource.MIHENTAI, "mihentai.com", pageSize = 30, searchPageSize = 10) {
|
||||||
|
override val datePattern = "MMM d, yyyy"
|
||||||
|
override val isTagsExclusionSupported = false
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue