Skip to content

Commit

Permalink
Update Sources
Browse files Browse the repository at this point in the history
Close #1060
  • Loading branch information
davvarrr committed Sep 13, 2024
1 parent e0e9d25 commit 0540da5
Show file tree
Hide file tree
Showing 26 changed files with 129 additions and 61 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ import org.koitharu.kotatsu.parsers.site.heancms.HeanCms
@Broken // Not dead but changed template
@MangaSourceParser("YUGEN_MANGAS_ES", "YugenMangas.lat", "es", ContentType.HENTAI)
internal class YugenMangasEs(context: MangaLoaderContext) :
HeanCms(context, MangaParserSource.YUGEN_MANGAS_ES, "ikigaimangas.fraviral.com")
HeanCms(context, MangaParserSource.YUGEN_MANGAS_ES, "lectorikigai.erigu.com")
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.koitharu.kotatsu.parsers.site.iken.en

import org.koitharu.kotatsu.parsers.MangaLoaderContext
import org.koitharu.kotatsu.parsers.MangaSourceParser
import org.koitharu.kotatsu.parsers.model.MangaParserSource
import org.koitharu.kotatsu.parsers.site.iken.IkenParser

@MangaSourceParser("PHILIASCANS", "PhiliaScans", "en")
internal class PhiliaScans(context: MangaLoaderContext) :
IkenParser(context, MangaParserSource.PHILIASCANS, "vortextoon.com") {
override val selectPages = "main section img"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import org.koitharu.kotatsu.parsers.site.iken.IkenParser

@MangaSourceParser("VORTEXSCANS", "VortexScans", "en")
internal class VortexScans(context: MangaLoaderContext) :
IkenParser(context, MangaParserSource.VORTEXSCANS, "vortexscans.org") {
IkenParser(context, MangaParserSource.VORTEXSCANS, "vortextoon.com") {
override val selectPages = "main section img"
}
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,32 @@ internal abstract class KeyoappParser(
override suspend fun getPages(chapter: MangaChapter): List<MangaPage> {
val fullUrl = chapter.url.toAbsoluteUrl(domain)
val doc = webClient.httpGet(fullUrl).parseHtml()
return doc.select(selectPage).map { img ->
val url = img.src()?.toRelativeUrl(domain) ?: img.parseFailed("Image src not found")
MangaPage(
id = generateUid(url),
url = url,
preview = null,
source = source,
)
val cdnUrl = doc.selectFirstOrThrow("script:containsData(primaryUrl)").data().substringAfter("https://cdn.")
.substringBefore("\${uid}")

if (cdnUrl.isNotEmpty()) {
return doc.select(selectPage).map { img ->
val uid = img.attr("uid") ?: img.parseFailed("Image src not found")
val url = "https://cdn.$cdnUrl$uid"
MangaPage(
id = generateUid(url),
url = url,
preview = null,
source = source,
)
}
} else {
return doc.select(selectPage).map { img ->
val url = img.src()?.toRelativeUrl(domain) ?: img.parseFailed("Image src not found")
MangaPage(
id = generateUid(url),
url = url,
preview = null,
source = source,
)
}
}

}

protected fun parseChapterDate(dateFormat: DateFormat, date: String?): Long {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.koitharu.kotatsu.parsers.site.keyoapp.en

import org.koitharu.kotatsu.parsers.MangaLoaderContext
import org.koitharu.kotatsu.parsers.MangaSourceParser
import org.koitharu.kotatsu.parsers.model.MangaParserSource
import org.koitharu.kotatsu.parsers.site.keyoapp.KeyoappParser

@MangaSourceParser("LUASCANS", "luaComic.net", "en")
internal class LuaScans(context: MangaLoaderContext) :
KeyoappParser(context, MangaParserSource.LUASCANS, "luacomic.net")
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,9 @@ package org.koitharu.kotatsu.parsers.site.keyoapp.en

import org.koitharu.kotatsu.parsers.MangaLoaderContext
import org.koitharu.kotatsu.parsers.MangaSourceParser
import org.koitharu.kotatsu.parsers.model.MangaChapter
import org.koitharu.kotatsu.parsers.model.MangaPage
import org.koitharu.kotatsu.parsers.model.MangaParserSource
import org.koitharu.kotatsu.parsers.site.keyoapp.KeyoappParser
import org.koitharu.kotatsu.parsers.util.domain
import org.koitharu.kotatsu.parsers.util.generateUid
import org.koitharu.kotatsu.parsers.util.parseFailed
import org.koitharu.kotatsu.parsers.util.parseHtml
import org.koitharu.kotatsu.parsers.util.toAbsoluteUrl

@MangaSourceParser("MAGUSMANGA", "MagusToon", "en")
internal class MagusToon(context: MangaLoaderContext) :
KeyoappParser(context, MangaParserSource.MAGUSMANGA, "magustoon.com") {

override suspend fun getPages(chapter: MangaChapter): List<MangaPage> {
val fullUrl = chapter.url.toAbsoluteUrl(domain)
val doc = webClient.httpGet(fullUrl).parseHtml()
return doc.select(selectPage).map { img ->
val id = img.attr("uid") ?: img.parseFailed("Image id not found")
val url = "https://cdn.$domain/x/$id"
MangaPage(
id = generateUid(url),
url = url,
preview = null,
source = source,
)
}
}
}
KeyoappParser(context, MangaParserSource.MAGUSMANGA, "magustoon.com")
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ internal abstract class MadaraParser(
altTitle = alt,
state = state,
chapters = chaptersDeferred.await(),
isNsfw = doc.selectFirst(".adult-confirm") != null,
)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.koitharu.kotatsu.parsers.site.madara.en

import org.koitharu.kotatsu.parsers.Broken
import org.koitharu.kotatsu.parsers.MangaLoaderContext
import org.koitharu.kotatsu.parsers.MangaSourceParser
import org.koitharu.kotatsu.parsers.model.MangaParserSource
import org.koitharu.kotatsu.parsers.site.madara.MadaraParser

@Broken
@MangaSourceParser("ANISASCANS", "AnisaScans", "en")
internal class AnisaScans(context: MangaLoaderContext) :
MadaraParser(context, MangaParserSource.ANISASCANS, "anisascans.in", 36) {
override val datePattern = "dd MMM, yyyy"
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ import org.koitharu.kotatsu.parsers.site.madara.MadaraParser

@MangaSourceParser("MANGAHALL", "MangaHall", "en", ContentType.HENTAI)
internal class MangaHall(context: MangaLoaderContext) :
MadaraParser(context, MangaParserSource.MANGAHALL, "mangahall.net", 24)
MadaraParser(context, MangaParserSource.MANGAHALL, "mangageek.org", 24)
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.koitharu.kotatsu.parsers.site.madara.en

import org.koitharu.kotatsu.parsers.MangaLoaderContext
import org.koitharu.kotatsu.parsers.MangaSourceParser
import org.koitharu.kotatsu.parsers.model.MangaParserSource
import org.koitharu.kotatsu.parsers.site.madara.MadaraParser

@MangaSourceParser("READER_EVILFLOWERS", "EvilFlowers", "en")
internal class ReaderEvilflowers(context: MangaLoaderContext) :
MadaraParser(context, MangaParserSource.READER_EVILFLOWERS, "evilflowers.com", pageSize = 10) {
override val listUrl = "project/"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.koitharu.kotatsu.parsers.site.madara.es

import org.koitharu.kotatsu.parsers.MangaLoaderContext
import org.koitharu.kotatsu.parsers.MangaSourceParser
import org.koitharu.kotatsu.parsers.model.MangaParserSource
import org.koitharu.kotatsu.parsers.site.madara.MadaraParser

@MangaSourceParser("BEGATRANSLATION", "BegaTranslation", "es")
internal class BegaTranslation(context: MangaLoaderContext) :
MadaraParser(context, MangaParserSource.BEGATRANSLATION, "begatranslation.com") {
override val datePattern = "dd/MM/yyyy"
override val listUrl = "series/"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import org.koitharu.kotatsu.parsers.site.madara.MadaraParser
internal class DoujinShell(context: MangaLoaderContext) :
MadaraParser(context, MangaParserSource.DOUJINSHELL, "www.doujinshell.com", 10) {
override val datePattern = "dd MMMM, yyyy"
override val listUrl = "/doujin"
override val tagPrefix = "/doujin-genero"
override val listUrl = "doujin/"
override val tagPrefix = "doujin-genero/"
override val selectPage = "img:not(.aligncenter)"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.koitharu.kotatsu.parsers.site.madara.MadaraParser

@MangaSourceParser("MHSCANS", "MhScans", "es")
internal class MhScans(context: MangaLoaderContext) :
MadaraParser(context, MangaParserSource.MHSCANS, "mhscans.manhuaonline.org") {
MadaraParser(context, MangaParserSource.MHSCANS, "mh.cookni.net") {
override val datePattern = "d 'de' MMMMM 'de' yyyy"
override val listUrl = "series/"
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package org.koitharu.kotatsu.parsers.site.madara.tr

import org.koitharu.kotatsu.parsers.Broken
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.MangaParserSource
import org.koitharu.kotatsu.parsers.site.madara.MadaraParser

@Broken
@MangaSourceParser("ALLIED_FANSUB", "AlliedFansub", "tr", ContentType.HENTAI)
internal class AlliedFansub(context: MangaLoaderContext) :
MadaraParser(context, MangaParserSource.ALLIED_FANSUB, "alliedfansub.net", 20) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import org.koitharu.kotatsu.parsers.site.madara.MadaraParser

@MangaSourceParser("PINKTEACOMIC", "PinkTeaComic", "vi")
internal class PinkTeaComic(context: MangaLoaderContext) :
MadaraParser(context, MangaParserSource.PINKTEACOMIC, "pinkteacomic.com") {
MadaraParser(context, MangaParserSource.PINKTEACOMIC, "pinkteacomics.com") {
override val datePattern = "d MMMM, yyyy"
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.koitharu.kotatsu.parsers.site.madara.MadaraParser

@MangaSourceParser("TRUYENVN", "TruyenVn", "vi", ContentType.HENTAI)
internal class TruyenVn(context: MangaLoaderContext) :
MadaraParser(context, MangaParserSource.TRUYENVN, "truyenvn.cam", 20) {
MadaraParser(context, MangaParserSource.TRUYENVN, "truyenvn.mobi", 20) {
override val listUrl = "truyen-tranh/"
override val tagPrefix = "the-loai/"
override val datePattern = "dd/MM/yyyy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import org.koitharu.kotatsu.parsers.MangaSourceParser
import org.koitharu.kotatsu.parsers.model.MangaParserSource
import org.koitharu.kotatsu.parsers.site.mangareader.MangaReaderParser

@MangaSourceParser("LUASCANS", "luaComic.net", "en")
internal class LuaScans(context: MangaLoaderContext) :
MangaReaderParser(context, MangaParserSource.LUASCANS, "luacomic.net", pageSize = 20, searchPageSize = 10) {
@MangaSourceParser("MYSHOJO", "MyShojo", "en")
internal class MyShojo(context: MangaLoaderContext) :
MangaReaderParser(context, MangaParserSource.MYSHOJO, "myshojo.com", pageSize = 20, searchPageSize = 10) {
override val isTagsExclusionSupported = false
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package org.koitharu.kotatsu.parsers.site.mangareader.en

import org.koitharu.kotatsu.parsers.Broken
import org.koitharu.kotatsu.parsers.MangaLoaderContext
import org.koitharu.kotatsu.parsers.MangaSourceParser
import org.koitharu.kotatsu.parsers.model.MangaParserSource
import org.koitharu.kotatsu.parsers.site.mangareader.MangaReaderParser

@Broken
@MangaSourceParser("VOIDSCANS_CO", "VoidScans", "en")
internal class VoidScansCo(context: MangaLoaderContext) :
MangaReaderParser(context, MangaParserSource.VOIDSCANS_CO, "voidscans.co", pageSize = 30, searchPageSize = 42)
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ import org.koitharu.kotatsu.parsers.site.mangareader.MangaReaderParser

@MangaSourceParser("LIANSCANS", "LianScans", "id", ContentType.HENTAI)
internal class Lianscans(context: MangaLoaderContext) :
MangaReaderParser(context, MangaParserSource.LIANSCANS, "www.lianscans.my.id", pageSize = 10, searchPageSize = 10) {
MangaReaderParser(context, MangaParserSource.LIANSCANS, "www.lianscans.com", pageSize = 10, searchPageSize = 10) {
override val datePattern = "MMM d, yyyy"
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import java.util.*

@MangaSourceParser("MANGATALE", "MangaTale", "id")
internal class MangaTaleParser(context: MangaLoaderContext) :
MangaReaderParser(context, MangaParserSource.MANGATALE, "mangatale.co", pageSize = 20, searchPageSize = 10) {
MangaReaderParser(context, MangaParserSource.MANGATALE, "mangatale.id", pageSize = 20, searchPageSize = 10) {
override val sourceLocale: Locale = Locale.ENGLISH
override val isTagsExclusionSupported = false
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import org.koitharu.kotatsu.parsers.model.MangaParserSource
import org.koitharu.kotatsu.parsers.site.mangareader.MangaReaderParser
import java.util.*

@MangaSourceParser("MANHWALIST", "ManhwaList.com", "id")
@MangaSourceParser("MANHWALIST", "ManhwaList.in", "id")
internal class ManhwalistParser(context: MangaLoaderContext) :
MangaReaderParser(context, MangaParserSource.MANHWALIST, "manhwalist.com", pageSize = 24, searchPageSize = 10) {
MangaReaderParser(context, MangaParserSource.MANHWALIST, "manhwalist.in", pageSize = 24, searchPageSize = 10) {
override val sourceLocale: Locale = Locale.ENGLISH
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import java.util.*
class YugenMangas(context: MangaLoaderContext) : PagedMangaParser(context, MangaParserSource.YUGENMANGAS, 28) {

override val availableSortOrders: Set<SortOrder> = EnumSet.of(SortOrder.UPDATED, SortOrder.ALPHABETICAL)
override val configKeyDomain = ConfigKey.Domain("yugenweb.com")
override val configKeyDomain = ConfigKey.Domain("yugenmangasbr.voblog.xyz")

override fun onCreateConfig(keys: MutableCollection<ConfigKey<*>>) {
super.onCreateConfig(keys)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.koitharu.kotatsu.parsers.site.zeistmanga.ar

import org.koitharu.kotatsu.parsers.MangaLoaderContext
import org.koitharu.kotatsu.parsers.MangaSourceParser
import org.koitharu.kotatsu.parsers.model.MangaParserSource
import org.koitharu.kotatsu.parsers.site.zeistmanga.ZeistMangaParser

@MangaSourceParser("XSANOMANGA", "XsanoManga", "ar")
internal class XsanoManga(context: MangaLoaderContext) :
ZeistMangaParser(context, MangaParserSource.XSANOMANGA, "www.xsano-manga.com")
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ import org.koitharu.kotatsu.parsers.site.zeistmanga.ZeistMangaParser

@MangaSourceParser("ICHIROMANGA", "IchiroManga", "id")
internal class IchiroManga(context: MangaLoaderContext) :
ZeistMangaParser(context, MangaParserSource.ICHIROMANGA, "www.ichiromanga.my.id")
ZeistMangaParser(context, MangaParserSource.ICHIROMANGA, "ichiromanga.my.id")
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.koitharu.kotatsu.parsers.site.zeistmanga.id

import org.koitharu.kotatsu.parsers.MangaLoaderContext
import org.koitharu.kotatsu.parsers.MangaSourceParser
import org.koitharu.kotatsu.parsers.model.MangaParserSource
import org.koitharu.kotatsu.parsers.site.zeistmanga.ZeistMangaParser

@MangaSourceParser("ULASCOMIC", "UlasComic", "id")
internal class UlasComic(context: MangaLoaderContext) :
ZeistMangaParser(context, MangaParserSource.ULASCOMIC, "www.ulascomic.xyz")

0 comments on commit 0540da5

Please sign in to comment.