[DynastyScans] Fixes
This commit is contained in:
@@ -39,8 +39,7 @@ internal class DynastyScans(context: MangaLoaderContext) :
|
|||||||
append("/search?q=")
|
append("/search?q=")
|
||||||
append(filter.query.urlEncoded())
|
append(filter.query.urlEncoded())
|
||||||
append("&")
|
append("&")
|
||||||
append("classes[]".urlEncoded())
|
append("classes[]=Series&page=")
|
||||||
append("=Serie&page=")
|
|
||||||
append(page.toString())
|
append(page.toString())
|
||||||
}
|
}
|
||||||
return parseMangaListQuery(webClient.httpGet(url).parseHtml())
|
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 doc = webClient.httpGet(manga.url.toAbsoluteUrl(domain)).parseHtml()
|
||||||
val chapters = getChapters(doc)
|
val chapters = getChapters(doc)
|
||||||
val root = doc.requireElementById("main")
|
val root = doc.requireElementById("main")
|
||||||
|
val licensedText = root.select("h4")
|
||||||
|
.find { it.ownText() == "This manga has been licensed" }
|
||||||
|
?.nextElementSibling()?.html()
|
||||||
return manga.copy(
|
return manga.copy(
|
||||||
altTitle = null,
|
altTitle = null,
|
||||||
state = when (root.select("h2.tag-title small").last()?.text()) {
|
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.
|
.orEmpty(), // It is needed if the manga was found via the search.
|
||||||
tags = root.selectFirstOrThrow("div.tag-tags").parseTags(),
|
tags = root.selectFirstOrThrow("div.tag-tags").parseTags(),
|
||||||
author = null,
|
author = null,
|
||||||
description = null,
|
description = licensedText,
|
||||||
chapters = chapters,
|
chapters = chapters,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
package org.koitharu.kotatsu.parsers
|
package org.koitharu.kotatsu.parsers
|
||||||
|
|
||||||
import org.junit.jupiter.params.provider.EnumSource
|
import org.junit.jupiter.params.provider.EnumSource
|
||||||
|
import org.junit.jupiter.params.provider.EnumSource.Mode.EXCLUDE
|
||||||
import org.koitharu.kotatsu.parsers.model.MangaParserSource
|
import org.koitharu.kotatsu.parsers.model.MangaParserSource
|
||||||
|
|
||||||
@EnumSource(MangaParserSource::class)
|
@EnumSource(MangaParserSource::class, names = ["DUMMY"], mode = EXCLUDE)
|
||||||
internal annotation class MangaSources
|
internal annotation class MangaSources
|
||||||
|
|||||||
Reference in New Issue
Block a user