Update domains
This commit is contained in:
@@ -71,7 +71,7 @@ internal abstract class GroupleParser(
|
||||
override val authUrl: String
|
||||
get() {
|
||||
val targetUri = "https://${domain}/".urlEncoded()
|
||||
return "https://grouple.co/internal/auth/sso?siteId=$siteId&=targetUri=$targetUri"
|
||||
return "https://3.grouple.co/internal/auth/sso?siteId=$siteId&=targetUri=$targetUri"
|
||||
}
|
||||
|
||||
override suspend fun isAuthorized(): Boolean = hasAuthCookie()
|
||||
|
||||
@@ -19,6 +19,7 @@ internal class ReadmangaParser(
|
||||
companion object {
|
||||
|
||||
val domains = arrayOf(
|
||||
"t.readmanga.io",
|
||||
"zz.readmanga.io",
|
||||
"readmanga.live",
|
||||
"readmanga.io",
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package org.koitharu.kotatsu.parsers.site.ru.multichan
|
||||
|
||||
import okhttp3.HttpUrl
|
||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||
import org.jsoup.internal.StringUtil
|
||||
import org.jsoup.nodes.Element
|
||||
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
||||
import org.koitharu.kotatsu.parsers.MangaParserAuthProvider
|
||||
import org.koitharu.kotatsu.parsers.core.LegacyMangaParser
|
||||
@@ -54,7 +56,7 @@ internal abstract class ChanParser(
|
||||
"/mangaka",
|
||||
).firstOrNull()?.text()
|
||||
Manga(
|
||||
id = generateUid(href),
|
||||
id = generateUid(a.attrAsRelativeUrlAnyHost("href")),
|
||||
url = href,
|
||||
publicUrl = href.toAbsoluteUrl(a.host ?: domain),
|
||||
altTitles = setOfNotNull(title.second),
|
||||
@@ -87,10 +89,10 @@ internal abstract class ChanParser(
|
||||
description = root.getElementById("description")?.html()?.substringBeforeLast("<div"),
|
||||
largeCoverUrl = root.getElementById("cover")?.absUrl("src"),
|
||||
chapters = root.select("table.table_cha tr:gt(1)").mapChapters(reversed = true) { i, tr ->
|
||||
val href = tr.selectFirst("a")?.attrAsRelativeUrlOrNull("href")
|
||||
?: return@mapChapters null
|
||||
val a = tr.selectFirst("a")
|
||||
val href = a?.attrAsRelativeUrlOrNull("href") ?: return@mapChapters null
|
||||
MangaChapter(
|
||||
id = generateUid(href),
|
||||
id = generateUid(a.attrAsRelativeUrlAnyHost("href")),
|
||||
title = tr.selectFirst("a")?.textOrNull(),
|
||||
number = i + 1f,
|
||||
volume = 0,
|
||||
@@ -170,7 +172,7 @@ internal abstract class ChanParser(
|
||||
"/mangaka",
|
||||
).firstOrNull()?.text()
|
||||
Manga(
|
||||
id = generateUid(href),
|
||||
id = generateUid(a.attrAsRelativeUrlAnyHost("href")),
|
||||
url = href,
|
||||
publicUrl = href.toAbsoluteUrl(a.host ?: domain),
|
||||
altTitles = setOfNotNull(title.second),
|
||||
@@ -256,4 +258,16 @@ internal abstract class ChanParser(
|
||||
}
|
||||
return this to null
|
||||
}
|
||||
|
||||
private fun Element.attrAsRelativeUrlAnyHost(attributeKey: String): String {
|
||||
val attr = attr(attributeKey)
|
||||
if (attr.isEmpty() || attr.startsWith("data:")) {
|
||||
throw IllegalArgumentException("Wrong url $attr")
|
||||
}
|
||||
if (attr.startsWith('/')) {
|
||||
return attr
|
||||
}
|
||||
val host = attr.toHttpUrl().host
|
||||
return attr.substringAfter(host)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@ import org.koitharu.kotatsu.parsers.util.*
|
||||
internal class YaoiChanParser(context: MangaLoaderContext) : ChanParser(context, MangaParserSource.YAOICHAN) {
|
||||
|
||||
override val configKeyDomain = ConfigKey.Domain(
|
||||
"v9.yaoi-chan.me",
|
||||
"v10.yaoi-chan.me",
|
||||
"v3.yaoi-chan.me",
|
||||
"v2.yaoi-chan.me",
|
||||
"v1.yaoi-chan.me",
|
||||
|
||||
Reference in New Issue
Block a user