Compare commits
No commits in common. "60a841f099f09da6d3e3cc3d8829490c48330b0a" and "f06f4e15e8b02f3ab19937369428d1882064d597" have entirely different histories.
60a841f099
...
f06f4e15e8
|
@ -63,6 +63,6 @@ for APK in ${APKS[@]}; do
|
|||
done | jq -sr '[.[]]' > index.json
|
||||
|
||||
# Alternate minified copy
|
||||
jq -c 'map(del(.hasReadme, .hasChangelog, .sources[]["versionId", "hasCloudflare"]))' < index.json > index.min.json
|
||||
jq -c '.' < index.json > index.min.json
|
||||
|
||||
cat index.json
|
||||
|
|
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 9.1 KiB |
After Width: | Height: | Size: 55 KiB |
|
@ -0,0 +1,7 @@
|
|||
package eu.kanade.tachiyomi.extension.en.chibimanga
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
class ChibiManga : Madara("Chibi Manga", "https://www.cmreader.info", "en", dateFormat = SimpleDateFormat("MMM dd, yyyy", Locale.US))
|
|
@ -8,7 +8,7 @@ import okhttp3.OkHttpClient
|
|||
import org.jsoup.nodes.Element
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class Shinigami : Madara("Shinigami", "https://shinigamitoon.com", "id") {
|
||||
class Shinigami : Madara("Shinigami", "https://shinigami.moe", "id") {
|
||||
// moved from Reaper Scans (id) to Shinigami (id)
|
||||
override val id = 3411809758861089969
|
||||
|
||||
|
|
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 7.9 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 48 KiB |
|
@ -0,0 +1,7 @@
|
|||
package eu.kanade.tachiyomi.extension.en.arenascans
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
|
||||
|
||||
class ArenaScans : MangaThemesia("Arena Scans", "https://arenascans.net", "en") {
|
||||
override val pageSelector = "div#readerarea img[data-src]"
|
||||
}
|
|
@ -13,7 +13,7 @@ import org.jsoup.nodes.Element
|
|||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
class XoxoComics : WPComics("XOXO Comics", "https://xoxocomic.com", "en", SimpleDateFormat("MM/dd/yyyy", Locale.US), null) {
|
||||
class XoxoComics : WPComics("XOXO Comics", "https://xoxocomics.net", "en", SimpleDateFormat("MM/dd/yyyy", Locale.US), null) {
|
||||
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/comic-updates?page=$page", headers)
|
||||
override fun latestUpdatesSelector() = "li.row"
|
||||
override fun latestUpdatesFromElement(element: Element): SManga {
|
||||
|
|
|
@ -65,7 +65,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Cat300", "https://cat300.com", "th", isNsfw = true, className = "Cat300", overrideVersionCode = 1),
|
||||
SingleLang("CatOnHeadTranslations", "https://catonhead.com", "en", overrideVersionCode = 2),
|
||||
SingleLang("Cerise Scan", "https://cerisescan.com", "pt-BR", pkgName = "cerisescans", isNsfw = true, overrideVersionCode = 7),
|
||||
|
||||
SingleLang("Chibi Manga", "https://www.cmreader.info", "en", overrideVersionCode = 1),
|
||||
SingleLang("Çizgi Roman Arşivi", "https://cizgiromanarsivi.com", "tr", className = "CizgiRomanArsivi"),
|
||||
SingleLang("Clover Manga", "https://clover-manga.com", "tr", overrideVersionCode = 2),
|
||||
SingleLang("Coco Rip", "https://cocorip.net", "es"),
|
||||
|
@ -435,7 +435,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Shayami", "https://shayami.com", "es"),
|
||||
SingleLang("Shiba Manga", "https://shibamanga.com", "en"),
|
||||
SingleLang("Shield Manga", "https://shieldmanga.io", "en", overrideVersionCode = 3),
|
||||
SingleLang("Shinigami", "https://shinigamitoon.com", "id", overrideVersionCode = 11),
|
||||
SingleLang("Shinigami", "https://shinigami.moe", "id", isNsfw = false, overrideVersionCode = 9),
|
||||
SingleLang("Shooting Star Scans", "https://shootingstarscans.com", "en"),
|
||||
SingleLang("ShoujoHearts", "https://shoujohearts.com", "en", overrideVersionCode = 2),
|
||||
SingleLang("Sinensis Scan", "https://sinensisscan.net", "pt-BR", pkgName = "sinensis", overrideVersionCode = 6),
|
||||
|
|
|
@ -20,6 +20,8 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
|
|||
SingleLang("AiYuManga", "https://aiyumanhua.com", "es", overrideVersionCode = 8),
|
||||
SingleLang("Alceascan", "https://alceascan.my.id", "id"),
|
||||
SingleLang("Animated Glitched Scans", "https://anigliscans.xyz", "en", overrideVersionCode = 1),
|
||||
SingleLang("Animated Glitched Comics", "https://agscomics.com", "en"),
|
||||
SingleLang("Arena Scans", "https://arenascans.net", "en", overrideVersionCode = 1),
|
||||
SingleLang("Arkham Scan", "https://arkhamscan.com", "pt-BR"),
|
||||
SingleLang("Arven Scans", "https://arvenscans.com", "en"),
|
||||
SingleLang("AscalonScans", "https://ascalonscans.com", "en"),
|
||||
|
|
|
@ -15,7 +15,7 @@ class WPComicsGenerator : ThemeSourceGenerator {
|
|||
SingleLang("NetTruyen", "https://www.nettruyenbing.com", "vi", overrideVersionCode = 20),
|
||||
SingleLang("NhatTruyen", "https://nhattruyenmax.com", "vi", overrideVersionCode = 13),
|
||||
SingleLang("TruyenChon", "http://truyenchon.com", "vi", overrideVersionCode = 3),
|
||||
SingleLang("XOXO Comics", "https://xoxocomic.com", "en", className = "XoxoComics", overrideVersionCode = 3),
|
||||
SingleLang("XOXO Comics", "https://xoxocomics.net", "en", className = "XoxoComics", overrideVersionCode = 2),
|
||||
)
|
||||
|
||||
companion object {
|
||||
|
|
|
@ -460,8 +460,8 @@ open class BatoTo(
|
|||
val script = document.selectFirst("script:containsData(imgHttpLis):containsData(batoWord):containsData(batoPass)")?.html()
|
||||
?: throw RuntimeException("Couldn't find script with image data.")
|
||||
|
||||
val imgHttpsString = script.substringAfter("const imgHttps =").substringBefore(";").trim()
|
||||
val imageUrls = json.parseToJsonElement(imgHttpsString).jsonArray.map { it.jsonPrimitive.content }
|
||||
val imgHttpLisString = script.substringAfter("const imgHttpLis =").substringBefore(";").trim()
|
||||
val imgHttpLis = json.parseToJsonElement(imgHttpLisString).jsonArray.map { it.jsonPrimitive.content }
|
||||
val batoWord = script.substringAfter("const batoWord =").substringBefore(";").trim()
|
||||
val batoPass = script.substringAfter("const batoPass =").substringBefore(";").trim()
|
||||
|
||||
|
@ -469,7 +469,7 @@ open class BatoTo(
|
|||
val imgAccListString = CryptoAES.decrypt(batoWord.removeSurrounding("\""), evaluatedPass)
|
||||
val imgAccList = json.parseToJsonElement(imgAccListString).jsonArray.map { it.jsonPrimitive.content }
|
||||
|
||||
return imageUrls.zip(imgAccList).mapIndexed { i, (imgUrl, imgAcc) ->
|
||||
return imgHttpLis.zip(imgAccList).mapIndexed { i, (imgUrl, imgAcc) ->
|
||||
Page(i, imageUrl = "$imgUrl?$imgAcc")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'LectorManga'
|
||||
pkgNameSuffix = 'es.lectormanga'
|
||||
extClass = '.LectorManga'
|
||||
extVersionCode = 32
|
||||
extVersionCode = 31
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ class LectorManga : ConfigurableSource, ParsedHttpSource() {
|
|||
it.text()
|
||||
}
|
||||
description = document.select(".col-12.mt-2").text()
|
||||
status = parseStatus(document.select(".status-publishing").text())
|
||||
status = parseStatus(document.select(".status-publishing").text().orEmpty())
|
||||
thumbnail_url = document.select(".text-center img.img-fluid").attr("src")
|
||||
}
|
||||
|
||||
|
@ -327,7 +327,6 @@ class LectorManga : ConfigurableSource, ParsedHttpSource() {
|
|||
private fun redirectToReadPage(document: Document): Document {
|
||||
val script1 = document.selectFirst("script:containsData(uniqid)")
|
||||
val script2 = document.selectFirst("script:containsData(window.location.replace)")
|
||||
val script3 = document.selectFirst("script:containsData(redirectUrl)")
|
||||
|
||||
val redirectHeaders = Headers.Builder()
|
||||
.add("Referer", document.baseUri())
|
||||
|
@ -356,14 +355,6 @@ class LectorManga : ConfigurableSource, ParsedHttpSource() {
|
|||
return redirectToReadPage(client.newCall(GET(url, redirectHeaders)).execute().asJsoup())
|
||||
}
|
||||
|
||||
if (script3 != null) {
|
||||
val data = script3.data()
|
||||
val regexRedirect = """redirectUrl\s?=\s?'(.+)'""".toRegex()
|
||||
val url = regexRedirect.find(data)!!.groupValues[1]
|
||||
|
||||
return redirectToReadPage(client.newCall(GET(url, redirectHeaders)).execute().asJsoup())
|
||||
}
|
||||
|
||||
return document
|
||||
}
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest />
|
|
@ -1,12 +0,0 @@
|
|||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
ext {
|
||||
extName = 'Traducciones Amistosas'
|
||||
pkgNameSuffix = 'es.nartag'
|
||||
extClass = '.Nartag'
|
||||
extVersionCode = 1
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
Before Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 218 KiB |
|
@ -1,274 +0,0 @@
|
|||
package eu.kanade.tachiyomi.extension.es.nartag
|
||||
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.network.interceptor.rateLimitHost
|
||||
import eu.kanade.tachiyomi.source.model.Filter
|
||||
import eu.kanade.tachiyomi.source.model.FilterList
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||
import okhttp3.Headers
|
||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import java.util.Calendar
|
||||
|
||||
class Nartag : ParsedHttpSource() {
|
||||
|
||||
override val name = "Traducciones Amistosas"
|
||||
|
||||
override val baseUrl = "https://nartag.com"
|
||||
|
||||
override val lang = "es"
|
||||
|
||||
override val supportsLatest = true
|
||||
|
||||
override val client: OkHttpClient = network.client.newBuilder()
|
||||
.rateLimitHost(baseUrl.toHttpUrl(), 2)
|
||||
.build()
|
||||
|
||||
override fun headersBuilder(): Headers.Builder = Headers.Builder()
|
||||
.add("Referer", baseUrl)
|
||||
|
||||
override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/biblioteca?page=$page", headers)
|
||||
|
||||
override fun popularMangaSelector(): String = "div.manga div.manga__item"
|
||||
|
||||
override fun popularMangaNextPageSelector(): String = "nav.paginator a[rel=next]"
|
||||
|
||||
override fun popularMangaFromElement(element: Element): SManga = SManga.create().apply {
|
||||
setUrlWithoutDomain(element.select("a.manga__link").attr("href"))
|
||||
title = element.select("a.manga__link").text()
|
||||
thumbnail_url = element.selectFirst("figure.manga__image > img")?.imgAttr()
|
||||
}
|
||||
|
||||
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/actualizaciones?page=$page", headers)
|
||||
|
||||
override fun latestUpdatesSelector(): String = popularMangaSelector()
|
||||
|
||||
override fun latestUpdatesNextPageSelector(): String = popularMangaNextPageSelector()
|
||||
|
||||
override fun latestUpdatesFromElement(element: Element): SManga = popularMangaFromElement(element)
|
||||
|
||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||
val url = "$baseUrl/biblioteca".toHttpUrl().newBuilder()
|
||||
.addQueryParameter("page", page.toString())
|
||||
|
||||
if (query.isNotEmpty()) {
|
||||
url.addQueryParameter("s", query)
|
||||
}
|
||||
|
||||
filters.forEach { filter ->
|
||||
when (filter) {
|
||||
is TypeFilter -> {
|
||||
if (filter.state != 0) {
|
||||
url.addQueryParameter("type", filter.toUriPart())
|
||||
}
|
||||
}
|
||||
is DemographicFilter -> {
|
||||
if (filter.state != 0) {
|
||||
url.addQueryParameter("demography", filter.toUriPart())
|
||||
}
|
||||
}
|
||||
is StatusFilter -> {
|
||||
if (filter.state != 0) {
|
||||
url.addQueryParameter("bookstatus", filter.toUriPart())
|
||||
}
|
||||
}
|
||||
is CategoryFilter -> {
|
||||
val includeArray = mutableListOf<String>()
|
||||
val excludeArray = mutableListOf<String>()
|
||||
filter.state.forEach { content ->
|
||||
when (content.state) {
|
||||
Filter.TriState.STATE_INCLUDE -> includeArray.add(content.value)
|
||||
Filter.TriState.STATE_EXCLUDE -> excludeArray.add(content.value)
|
||||
}
|
||||
}
|
||||
if (includeArray.isNotEmpty()) {
|
||||
url.addQueryParameter("category", includeArray.joinToString(","))
|
||||
}
|
||||
if (excludeArray.isNotEmpty()) {
|
||||
url.addQueryParameter("excategories", excludeArray.joinToString(","))
|
||||
}
|
||||
}
|
||||
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
return GET(url.build(), headers)
|
||||
}
|
||||
|
||||
override fun searchMangaSelector(): String = popularMangaSelector()
|
||||
|
||||
override fun searchMangaNextPageSelector(): String = popularMangaNextPageSelector()
|
||||
|
||||
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
|
||||
|
||||
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply {
|
||||
with(document.selectFirst("section.manga__card")!!) {
|
||||
title = select("div.manga__title > h2").text()
|
||||
thumbnail_url = selectFirst("figure.manga__cover > img")?.imgAttr()
|
||||
genre = select("div.category__item > a").joinToString { it.text() }
|
||||
status = select("div.manga__status span.status__name").text().toStatus()
|
||||
description = select("div.manga__description > p").text()
|
||||
}
|
||||
}
|
||||
|
||||
override fun chapterListSelector(): String = "section.manga__chapters div.chapter__item"
|
||||
|
||||
override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply {
|
||||
setUrlWithoutDomain(element.select("div.chapter__actions a").attr("href"))
|
||||
name = element.select(".chapter__title").text()
|
||||
date_upload = parseRelativeDate(element.select("span.chapter__date").text())
|
||||
}
|
||||
|
||||
override fun pageListParse(document: Document): List<Page> {
|
||||
return document.select("div.view__content > div.reader__item > img").mapIndexed { i, element ->
|
||||
Page(i, "", element.imgAttr())
|
||||
}
|
||||
}
|
||||
|
||||
private fun String.toStatus(): Int = when (this) {
|
||||
"En emisión", "Ongoing" -> SManga.ONGOING
|
||||
"Finalizado" -> SManga.COMPLETED
|
||||
"Publishing finished" -> SManga.PUBLISHING_FINISHED
|
||||
"En pausa" -> SManga.ON_HIATUS
|
||||
else -> SManga.UNKNOWN
|
||||
}
|
||||
|
||||
private fun Element.imgAttr(): String = when {
|
||||
hasAttr("data-lazy-src") -> attr("abs:data-lazy-src")
|
||||
hasAttr("data-src") -> attr("abs:data-src")
|
||||
else -> attr("abs:src")
|
||||
}
|
||||
|
||||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used!")
|
||||
|
||||
override fun getFilterList(): FilterList = FilterList(
|
||||
TypeFilter(),
|
||||
DemographicFilter(),
|
||||
StatusFilter(),
|
||||
CategoryFilter("Categorías", getCategoryList()),
|
||||
)
|
||||
|
||||
private class TypeFilter : UriPartFilter(
|
||||
"Tipo",
|
||||
arrayOf(
|
||||
Pair("<Seleccionar>", ""),
|
||||
Pair("Manga", "manga"),
|
||||
Pair("Manhua", "manhua"),
|
||||
Pair("Manhwa", "manhwa"),
|
||||
Pair("One Shot", "one-shot"),
|
||||
Pair("Doujinshi", "doujinshi"),
|
||||
),
|
||||
)
|
||||
|
||||
private class DemographicFilter : UriPartFilter(
|
||||
"Demografía",
|
||||
arrayOf(
|
||||
Pair("<Seleccionar>", ""),
|
||||
Pair("Shounen", "shonen"),
|
||||
Pair("Shoujo", "shojo"),
|
||||
Pair("Seinen", "seinen"),
|
||||
Pair("Josei", "josei"),
|
||||
Pair("Kodomo", "kodomo"),
|
||||
),
|
||||
)
|
||||
|
||||
private class StatusFilter : UriPartFilter(
|
||||
"Estado",
|
||||
arrayOf(
|
||||
Pair("<Seleccionar>", ""),
|
||||
Pair("Desconocido", "desconocido"),
|
||||
Pair("Ongoing", "ongoing"),
|
||||
Pair("Finalizado", "finalizado"),
|
||||
Pair("Publishing finished", "publishing-finished"),
|
||||
Pair("En emisión", "en-emisi-n"),
|
||||
Pair("En pausa", "en-pausa"),
|
||||
),
|
||||
)
|
||||
|
||||
class Category(title: String, val value: String) : Filter.TriState(title)
|
||||
class CategoryFilter(title: String, categories: List<Category>) : Filter.Group<Category>(title, categories)
|
||||
|
||||
private fun getCategoryList() = listOf(
|
||||
Category("Acción", "accion"),
|
||||
Category("Animación", "animacion"),
|
||||
Category("Apocalíptico", "apocaliptico"),
|
||||
Category("Artes Marciales", "artes-marciales"),
|
||||
Category("Aventura", "aventura"),
|
||||
Category("Boys Love", "boys-love"),
|
||||
Category("Ciberpunk", "ciberpunk"),
|
||||
Category("Ciencia Ficción", "ciencia-ficcion"),
|
||||
Category("Comedia", "comedia"),
|
||||
Category("Crimen", "crimen"),
|
||||
Category("Demonios", "demonios"),
|
||||
Category("Deporte", "deporte"),
|
||||
Category("Drama", "drama"),
|
||||
Category("Ecchi", "ecchi"),
|
||||
Category("Extranjero", "extranjero"),
|
||||
Category("Familia", "familia"),
|
||||
Category("Fantasia", "fantasia"),
|
||||
Category("Género Bender", "genero-bender"),
|
||||
Category("Girls Love", "girls-love"),
|
||||
Category("Gore", "gore"),
|
||||
Category("Guerra", "guerra"),
|
||||
Category("Harem", "harem"),
|
||||
Category("Historia", "historia"),
|
||||
Category("Horror", "horror"),
|
||||
Category("Magia", "magia"),
|
||||
Category("Mecha", "mecha"),
|
||||
Category("Militar", "militar"),
|
||||
Category("Misterio", "misterio"),
|
||||
Category("Murim", "murim"),
|
||||
Category("Musica", "musica"),
|
||||
Category("Niños", "ninos"),
|
||||
Category("Oeste", "oeste"),
|
||||
Category("Parodia", "parodia"),
|
||||
Category("Policiaco", "policiaco"),
|
||||
Category("Psicológico", "psicologico"),
|
||||
Category("Realidad", "realidad"),
|
||||
Category("Realidad Virtual", "realidad-virtual"),
|
||||
Category("Recuentos de la vida", "recuentos-de-la-vida"),
|
||||
Category("Reencarnacion", "reencarnacion"),
|
||||
Category("Regresion", "regresion"),
|
||||
Category("Romance", "romance"),
|
||||
Category("Samurái", "samurai"),
|
||||
Category("Sobrenatural", "sobrenatural"),
|
||||
Category("Superpoderes", "superpoderes"),
|
||||
Category("Telenovela", "telenovela"),
|
||||
Category("Thriller", "thriller"),
|
||||
Category("Tragedia", "tragedia"),
|
||||
Category("Vampiros", "vampiros"),
|
||||
Category("Vida Escolar", "vida-escolar"),
|
||||
)
|
||||
|
||||
private fun parseRelativeDate(date: String): Long {
|
||||
val number = Regex("""(\d+)""").find(date)?.value?.toIntOrNull() ?: return 0
|
||||
val cal = Calendar.getInstance()
|
||||
|
||||
return when {
|
||||
WordSet("segundo").anyWordIn(date) -> cal.apply { add(Calendar.SECOND, -number) }.timeInMillis
|
||||
WordSet("minuto").anyWordIn(date) -> cal.apply { add(Calendar.MINUTE, -number) }.timeInMillis
|
||||
WordSet("hora").anyWordIn(date) -> cal.apply { add(Calendar.HOUR, -number) }.timeInMillis
|
||||
WordSet("día", "dia").anyWordIn(date) -> cal.apply { add(Calendar.DAY_OF_MONTH, -number) }.timeInMillis
|
||||
WordSet("semana").anyWordIn(date) -> cal.apply { add(Calendar.DAY_OF_MONTH, -number * 7) }.timeInMillis
|
||||
WordSet("mes").anyWordIn(date) -> cal.apply { add(Calendar.MONTH, -number) }.timeInMillis
|
||||
WordSet("año").anyWordIn(date) -> cal.apply { add(Calendar.YEAR, -number) }.timeInMillis
|
||||
else -> 0
|
||||
}
|
||||
}
|
||||
|
||||
class WordSet(private vararg val words: String) {
|
||||
fun anyWordIn(dateString: String): Boolean = words.any { dateString.contains(it, ignoreCase = true) }
|
||||
}
|
||||
|
||||
private open class UriPartFilter(displayName: String, val vals: Array<Pair<String, String>>) :
|
||||
Filter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
|
||||
fun toUriPart() = vals[state].second
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'TuMangaOnline'
|
||||
pkgNameSuffix = 'es.tumangaonline'
|
||||
extClass = '.TuMangaOnline'
|
||||
extVersionCode = 47
|
||||
extVersionCode = 46
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ class TuMangaOnline : ConfigurableSource, ParsedHttpSource() {
|
|||
it.text()
|
||||
}
|
||||
description = document.select("p.element-description").text()
|
||||
status = parseStatus(document.select("span.book-status").text())
|
||||
status = parseStatus(document.select("span.book-status").text().orEmpty())
|
||||
thumbnail_url = document.select(".book-thumbnail").attr("src")
|
||||
}
|
||||
private fun parseStatus(status: String) = when {
|
||||
|
@ -303,7 +303,6 @@ class TuMangaOnline : ConfigurableSource, ParsedHttpSource() {
|
|||
private fun redirectToReadPage(document: Document): Document {
|
||||
val script1 = document.selectFirst("script:containsData(uniqid)")
|
||||
val script2 = document.selectFirst("script:containsData(window.location.replace)")
|
||||
val script3 = document.selectFirst("script:containsData(redirectUrl)")
|
||||
|
||||
val redirectHeaders = Headers.Builder()
|
||||
.add("Referer", document.baseUri())
|
||||
|
@ -332,14 +331,6 @@ class TuMangaOnline : ConfigurableSource, ParsedHttpSource() {
|
|||
return redirectToReadPage(client.newCall(GET(url, redirectHeaders)).execute().asJsoup())
|
||||
}
|
||||
|
||||
if (script3 != null) {
|
||||
val data = script3.data()
|
||||
val regexRedirect = """redirectUrl\s?=\s?'(.+)'""".toRegex()
|
||||
val url = regexRedirect.find(data)!!.groupValues[1]
|
||||
|
||||
return redirectToReadPage(client.newCall(GET(url, redirectHeaders)).execute().asJsoup())
|
||||
}
|
||||
|
||||
return document
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import uy.kohesive.injekt.api.get
|
|||
import java.io.IOException
|
||||
import kotlin.random.Random
|
||||
|
||||
private const val DEFAULT_LIST = "https://www.hm08.lol,https://www.hm09.lol,https://www.hm10.lol,https://www.hm06.lol,https://www.hm07.lol,https://www.hm05.lol,https://www.hm04.lol,https://www.hm01.lol,https://www.hm02.lol,https://www.hm03.lol,https://www.hm1.lol,https://www.hm2.lol,https://www.hm3.lol"
|
||||
private const val DEFAULT_LIST = "https://www.htmanga9.top,https://www.htmanga7.top,https://www.htmanga6.top,https://www.htmanga3.top,https://www.htmanga4.top,https://www.htmanga5.top"
|
||||
|
||||
fun getPreferencesInternal(
|
||||
context: Context,
|
||||
|
@ -40,7 +40,7 @@ val SharedPreferences.baseUrl: String
|
|||
val SharedPreferences.urlIndex get() = getString(URL_INDEX_PREF, "-1")!!.toInt()
|
||||
val SharedPreferences.urlList get() = getString(URL_LIST_PREF, DEFAULT_LIST)!!.split(",")
|
||||
|
||||
fun getCiBaseUrl() = DEFAULT_LIST.replace(",", "#, ")
|
||||
fun getCiBaseUrl() = DEFAULT_LIST.replace(",", ", ")
|
||||
|
||||
fun getSharedPreferences(id: Long): SharedPreferences {
|
||||
val preferences: SharedPreferences = Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
||||
|
|