[DynastyScans] Fixes

master
Koitharu 2 years ago
parent 7ccc6438d5
commit b9d89edfc2
Signed by: Koitharu
GPG Key ID: 676DEE768C17A9D7

@ -39,8 +39,7 @@ internal class DynastyScans(context: MangaLoaderContext) :
append("/search?q=")
append(filter.query.urlEncoded())
append("&")
append("classes[]".urlEncoded())
append("=Serie&page=")
append("classes[]=Series&page=")
append(page.toString())
}
return parseMangaListQuery(webClient.httpGet(url).parseHtml())
@ -155,6 +154,9 @@ internal class DynastyScans(context: MangaLoaderContext) :
val doc = webClient.httpGet(manga.url.toAbsoluteUrl(domain)).parseHtml()
val chapters = getChapters(doc)
val root = doc.requireElementById("main")
val licensedText = root.select("h4")
.find { it.ownText() == "This manga has been licensed" }
?.nextElementSibling()?.html()
return manga.copy(
altTitle = null,
state = when (root.select("h2.tag-title small").last()?.text()) {
@ -168,7 +170,7 @@ internal class DynastyScans(context: MangaLoaderContext) :
.orEmpty(), // It is needed if the manga was found via the search.
tags = root.selectFirstOrThrow("div.tag-tags").parseTags(),
author = null,
description = null,
description = licensedText,
chapters = chapters,
)
}

@ -1,7 +1,8 @@
package org.koitharu.kotatsu.parsers
import org.junit.jupiter.params.provider.EnumSource
import org.junit.jupiter.params.provider.EnumSource.Mode.EXCLUDE
import org.koitharu.kotatsu.parsers.model.MangaParserSource
@EnumSource(MangaParserSource::class)
@EnumSource(MangaParserSource::class, names = ["DUMMY"], mode = EXCLUDE)
internal annotation class MangaSources

Loading…
Cancel
Save