[YaoiLib] New parser
This commit is contained in:
@@ -142,7 +142,10 @@ abstract class MangaLoaderContext {
|
||||
|
||||
private fun Response.ensureSuccess() = apply {
|
||||
val exception: Exception? = when (code) { // Catch some error codes, not all
|
||||
in 500..599 -> HttpStatusException(message, code, request.url.toString())
|
||||
404,
|
||||
in 500..599,
|
||||
-> HttpStatusException(message, code, request.url.toString())
|
||||
|
||||
else -> null
|
||||
}
|
||||
if (exception != null) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.koitharu.kotatsu.parsers.site
|
||||
package org.koitharu.kotatsu.parsers.site.rulib
|
||||
|
||||
import org.jsoup.nodes.Document
|
||||
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.koitharu.kotatsu.parsers.site
|
||||
package org.koitharu.kotatsu.parsers.site.rulib
|
||||
|
||||
import androidx.collection.ArraySet
|
||||
import org.json.JSONArray
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.koitharu.kotatsu.parsers.site.rulib
|
||||
|
||||
import org.jsoup.nodes.Document
|
||||
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
||||
import org.koitharu.kotatsu.parsers.MangaSourceParser
|
||||
import org.koitharu.kotatsu.parsers.config.ConfigKey
|
||||
import org.koitharu.kotatsu.parsers.model.MangaSource
|
||||
|
||||
@MangaSourceParser("YAOILIB", "YaoiLib", "ru")
|
||||
internal class YaoiLibParser(context: MangaLoaderContext) : MangaLibParser(context, MangaSource.YAOILIB) {
|
||||
|
||||
override val configKeyDomain = ConfigKey.Domain("yaoilib.me", null)
|
||||
override fun isNsfw(doc: Document) = true
|
||||
}
|
||||
Reference in New Issue
Block a user